There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Solved: Can you help me?


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
beahare's Avatar
Account Disabled with 74 posts.
 
Join Date: Sep 2005
Experience: Intermediate
27-Dec-2005, 11:27 AM #1
Solved: Can you help me?
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's e-mail address, for example,
user@hotmail.com:</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's e-mail address, for example, billgates@microsoft.com:</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>
Chicon's Avatar
Computer Specs
Distinguished Member with 6,553 posts.
 
Join Date: Jul 2004
Location: 50° 34' 07.13" N - 04° 10' 23.
Experience: Second socks retriever
27-Dec-2005, 10:34 PM #2
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:

<!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,
user@hotmail.com:</label>
<br />
<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" />
</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, billgates@microsoft.com:</label>
<br />
<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" />
</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>
Also, if you are opting for that solution, don't forget to adapt the action mail.php.
__________________
for ( ; ; ) ;

Examinations time is coming, take a Java beta exam and get a belt !
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:46 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.