Solved: Can you help me?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

beahare

Thread Starter
Banned
Joined
Sep 11, 2005
Messages
74
Hi! I need help editing this script to allow a sender name field in the e-mail instead of just sender name!

Thanks so much!

The script is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>GC Mail</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="dr0n3" />
</head>
<body>
<h1 align="center"><font color="#FF6600" size="5">You can now send
in plain text or html!</font></h1>
<p align="center"><font color="#660000" size="2" face="Arial, Helvetica, sans-serif">All
fields are required to be complete and valid.</font></p>
<font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
</font>
<form action="/members/anon2/mail.php" method="post">
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="recipient_e_addr">Recipient&#39;s e-mail address, for example,
[email protected]:</label>
<br />
<input name="recipient_e_addr" id="recipient_e_addr" type="text" value="" size="20" maxlength="100" />
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="sender_e_addr">Sender&#39;s e-mail address, for example, [email protected]:</label>
<br />
<input name="sender_e_addr" id="sender_e_addr" type="text" value="" size="20" maxlength="100" />
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="subject">Subject, for example, Microsoft Corporation:</label>
<br />
<input name="subject" id="subject" type="text" value="" size="20" maxlength="100" />
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="x_originating_ip">X-Originating-IP, for example, 207.46.249.27:</label>
<br />
<input name="x_originating_ip" id="x_originating_ip" type="text" value="" size="20" maxlength="15" />
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="content_type">Content-Type:</label>
<br />
<select name="content_type" id="content_type">
<option>text/plain</option>
<option>text/html</option>
</select>
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="message">Message, for example, Hello (max 10,000 chars):</label>
<br />
<textarea name="message" id="message" rows="10" cols="50"></textarea>
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<input type="submit" name="submit" value="Mail" />
</font></p>
</form>
</body>

</html>
 
Joined
Jul 29, 2004
Messages
6,650
Hi beahare,

Welcome to TSG ! :)

I'm not a HTML expert but I guess the problem is probably caused by the insertion of a @ character inside an input text.
You may solve this problem with 2 separate input texts : the first for the left part of the email adress and the second for the part after the @ character.

Code:
[SIZE=2]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>GC Mail</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="dr0n3" />
</head>
<body>
<h1 align="center"><font color="#FF6600" size="5">You can now send
in plain text or html!</font></h1>
<p align="center"><font color="#660000" size="2" face="Arial, Helvetica, sans-serif">All
fields are required to be complete and valid.</font></p>
<font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
</font>
<form action="/members/anon2/mail.php" method="post">
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="recipient_e_addr">Recipient's e-mail address, for example,
[email protected]:</label>
<br />
[B][COLOR=Red]<input name="recipient_e_addr" id="recipient_e_addr1" type="text" value="" size="20" maxlength="50" /><b>@</b>
<input name="recipient_e_addr" id="recipient_e_addr2" type="text" value="" size="20" maxlength="50" />[/COLOR][/B]
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="sender_e_addr">Sender's e-mail address, for example, [email protected]:</label>
<br />
[B][COLOR=Red]<input name="sender_e_addr" id="sender_e_addr1" type="text" value="" size="20" maxlength="50" /><b>@</b>
<input name="sender_e_addr" id="sender_e_addr2" type="text" value="" size="20" maxlength="50" />[/COLOR][/B]
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="subject">Subject, for example, Microsoft Corporation:</label>
<br />
<input name="subject" id="subject" type="text" value="" size="20" maxlength="100" />
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="x_originating_ip">X-Originating-IP, for example, 207.46.249.27:</label>
<br />
<input name="x_originating_ip" id="x_originating_ip" type="text" value="" size="20" maxlength="15" />
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="content_type">Content-Type:</label>
<br />
<select name="content_type" id="content_type">
<option>text/plain</option>
<option>text/html</option>
</select>
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<label for="message">Message, for example, Hello (max 10,000 chars):</label>
<br />
<textarea name="message" id="message" rows="10" cols="50"></textarea>
</font></p>
<p align="center"> <font color="#660000" size="2" face="Arial, Helvetica, sans-serif">
<input type="submit" name="submit" value="Mail" />
</font></p>
</form>
</body>

</html>
[/SIZE]
Also, if you are opting for that solution, don't forget to adapt the action mail.php.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top