weikelbob
asked on
Adding reset button to an email form.
Hello,
Could you guys look over my script below and tell me how to add a 'reset' button to the following e-mail form. The Form is in Flash MX.
<?php
$first_name = $_POST['t1'];
$last_name = $_POST['t2'];
$email = $_POST['t3'];
$menu1 = $_POST['t4'];
$message = "First-name: $first_name\n";
$message .= "Last-name: $last_name\n";
$message .= "E-mail: $email\n";
$message .= "Message: $comments\n";
mail ("weikelbob@aol.com",$firs t_name,$me ssage);
header("Location: http://jibzauctions.com/index.html");
exit;
?>
Could you guys look over my script below and tell me how to add a 'reset' button to the following e-mail form. The Form is in Flash MX.
<?php
$first_name = $_POST['t1'];
$last_name = $_POST['t2'];
$email = $_POST['t3'];
$menu1 = $_POST['t4'];
$message = "First-name: $first_name\n";
$message .= "Last-name: $last_name\n";
$message .= "E-mail: $email\n";
$message .= "Message: $comments\n";
mail ("weikelbob@aol.com",$firs
header("Location: http://jibzauctions.com/index.html");
exit;
?>
ASKER
Working on it...
ASKER
I keep getting an error when I hit 'submit':
Parse error: parse error, unexpected '<' in /home/content/j/b/c/jbcell ular1/html /nonf/form .php on line 12
Do you think my server is incompatible with the tag we added? Here's the code with the input tag:
<?php
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email = $_POST['email'];
$menu1 = $_POST['comments'];
$message = "First-name: $first_name\n";
$message .= "Last-name: $last_name\n";
$message .= "E-mail: $email\n";
$message .= "Message: $comments\n";
<input name="Reset" type="reset" value="Reset Fields">
mail ("weikelbob@aol.com",$firs t_name,$me ssage);
header("Location: http://jibzauctions.com/nonf/index.html");
exit;
?>
Parse error: parse error, unexpected '<' in /home/content/j/b/c/jbcell
Do you think my server is incompatible with the tag we added? Here's the code with the input tag:
<?php
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email = $_POST['email'];
$menu1 = $_POST['comments'];
$message = "First-name: $first_name\n";
$message .= "Last-name: $last_name\n";
$message .= "E-mail: $email\n";
$message .= "Message: $comments\n";
<input name="Reset" type="reset" value="Reset Fields">
mail ("weikelbob@aol.com",$firs
header("Location: http://jibzauctions.com/nonf/index.html");
exit;
?>
No, this is not the page to edit.
When you are at the form, filling out your email, look at your address bar to see what the name of that file is, then post the code here and I will help you edit it.
P.S. Remove that input line in that script ^^
When you are at the form, filling out your email, look at your address bar to see what the name of that file is, then post the code here and I will help you edit it.
P.S. Remove that input line in that script ^^
ASKER
Here's the form. Let me know if you need more from that file.
<form style="margin:0;color:#438 092;margin -left:17px ;margin-to p:21px" action="form.php" method="post">
First Name:<br>
<input name="first_name" type="text" id="first_name" style="width:234px;height: 19px;font- size:11px; border-col or:#C7C7C7 ;border-st yle:solid; border-wid th:1px;bac kground-co lor:#F3F3F 3;margin-t op:2px;mar gin-bottom :6px">
<br>
Last Name:<br>
<input name="last_name" type="text" id="last_name" style="width:234px;height: 19px;font- size:11px; border-col or:#C7C7C7 ;border-st yle:solid; border-wid th:1px;bac kground-co lor:#F3F3F 3;margin-t op:2px;mar gin-bottom :6px">
<br>
Email:<br>
<input name="email" type="text" id="email" style="width:234px;height: 19px;font- size:11px; border-col or:#C7C7C7 ;border-st yle:solid; border-wid th:1px;bac kground-co lor:#F3F3F 3;margin-t op:2px;mar gin-bottom :6px">
<br>
Comments:
<textarea name="comments" cols="" rows="" id="comments" style="width:234px;height: 155px;font -size:11px ;border-co lor:#C7C7C 7;border-s tyle:solid ;border-wi dth:1px;ba ckground-c olor:#F3F3 F3;margin- top:2px;ma rgin-botto m:6px;over flow:auto" ></textare a>
<br>
<div align="right" style=" padding-right:18px">
<input type="image" src="5-but_01.jpg" align="absmiddle" width="90" height="9" border="0">
<input type="image" onClick="this.Submit()" src="5-but_02.jpg" align="absmiddle" width="90" height="9" border="0">
</div>
</form>
<form style="margin:0;color:#438
First Name:<br>
<input name="first_name" type="text" id="first_name" style="width:234px;height:
<br>
Last Name:<br>
<input name="last_name" type="text" id="last_name" style="width:234px;height:
<br>
Email:<br>
<input name="email" type="text" id="email" style="width:234px;height:
<br>
Comments:
<textarea name="comments" cols="" rows="" id="comments" style="width:234px;height:
<br>
<div align="right" style=" padding-right:18px">
<input type="image" src="5-but_01.jpg" align="absmiddle" width="90" height="9" border="0">
<input type="image" onClick="this.Submit()" src="5-but_02.jpg" align="absmiddle" width="90" height="9" border="0">
</div>
</form>
<form style="margin:0;color:#438 092;margin -left:17px ;margin-to p:21px" action="form.php" method="post">
First Name:<br>
<input name="first_name" type="text" id="first_name" style="width:234px;height: 19px;font- size:11px; border-col or:#C7C7C7 ;border-st yle:solid; border-wid th:1px;bac kground-co lor:#F3F3F 3;margin-t op:2px;mar gin-bottom :6px">
<br>
Last Name:<br>
<input name="last_name" type="text" id="last_name" style="width:234px;height: 19px;font- size:11px; border-col or:#C7C7C7 ;border-st yle:solid; border-wid th:1px;bac kground-co lor:#F3F3F 3;margin-t op:2px;mar gin-bottom :6px">
<br>
Email:<br>
<input name="email" type="text" id="email" style="width:234px;height: 19px;font- size:11px; border-col or:#C7C7C7 ;border-st yle:solid; border-wid th:1px;bac kground-co lor:#F3F3F 3;margin-t op:2px;mar gin-bottom :6px">
<br>
Comments:
<textarea name="comments" cols="" rows="" id="comments" style="width:234px;height: 155px;font -size:11px ;border-co lor:#C7C7C 7;border-s tyle:solid ;border-wi dth:1px;ba ckground-c olor:#F3F3 F3;margin- top:2px;ma rgin-botto m:6px;over flow:auto" ></textare a>
<br>
<div align="right" style=" padding-right:18px">
<input type="image" src="5-but_01.jpg" align="absmiddle" width="90" height="9" border="0">
<input type="image" onClick="this.Submit()" src="5-but_02.jpg" align="absmiddle" width="90" height="9" border="0">
<input name="Reset" type="reset" value="Reset Fields">
</div>
</form>
First Name:<br>
<input name="first_name" type="text" id="first_name" style="width:234px;height:
<br>
Last Name:<br>
<input name="last_name" type="text" id="last_name" style="width:234px;height:
<br>
Email:<br>
<input name="email" type="text" id="email" style="width:234px;height:
<br>
Comments:
<textarea name="comments" cols="" rows="" id="comments" style="width:234px;height:
<br>
<div align="right" style=" padding-right:18px">
<input type="image" src="5-but_01.jpg" align="absmiddle" width="90" height="9" border="0">
<input type="image" onClick="this.Submit()" src="5-but_02.jpg" align="absmiddle" width="90" height="9" border="0">
<input name="Reset" type="reset" value="Reset Fields">
</div>
</form>
ASKER
ASKER
I was messing with the files a little, i'll stop. Hope I didn't disturb what you were doing.
Bob
Bob
ASKER
This is kind of urgent, could someone assist me with this?
Bob
Bob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
Thanks for the script. I cannot get it to work.
The URL to my customer's site is jibzauctions.com/nonf/
Also, here's the form.php that is in the same directory as this script that i named index-5.html.
<?php
$msg = "First Name: " . $_POST['first_name'] . "\n";
$msg = "Last Name: " . $_POST['last_name'] . "\n";
$msg .= "Email: " . $_POST['email'] . "\n";
$msg .= "Comments: " . $_POST['comments'] . "\n";
$recipient = "weikelbob@aol.com";
$subject = "A customer2";
if(mail($recipient, $subject, $msg))
echo "mail sent !";
else
echo "Error in sending mail!";
?>
I appreciate the help.
Thanks for the script. I cannot get it to work.
The URL to my customer's site is jibzauctions.com/nonf/
Also, here's the form.php that is in the same directory as this script that i named index-5.html.
<?php
$msg = "First Name: " . $_POST['first_name'] . "\n";
$msg = "Last Name: " . $_POST['last_name'] . "\n";
$msg .= "Email: " . $_POST['email'] . "\n";
$msg .= "Comments: " . $_POST['comments'] . "\n";
$recipient = "weikelbob@aol.com";
$subject = "A customer2";
if(mail($recipient, $subject, $msg))
echo "mail sent !";
else
echo "Error in sending mail!";
?>
I appreciate the help.
What is not working, the reset or the mailer?
ASKER
The reset is not working. Both of the words "submit" and "reset" bring up 'mail sent'
and they both send me a message ( with the subject being the last name instead of the first name as it should be"
Bob
and they both send me a message ( with the subject being the last name instead of the first name as it should be"
Bob
ASKER
I'm going to switch over to the cgi form mailer way since Godaddy doesn't recognize php very well.
So I'm closing this question.
Bob
So I'm closing this question.
Bob
That will reset all the fields.
Hope this helps.