![]() |
PHP Mailform Problem ($_get...)
can anyone help me with my PHP problem
here is the script for my mailform -------------- <?php if($_COOKIE[sentemail] > 2){ include("sorry.php"); } else{ if($_COOKIE[sentemail]) { $num = 1; } else { $num = $_COOKIE[sentemail] + 1; } setcookie("sentemail", "$num", time()+600); //set the cookie $email = "First Name:\t$firstname\n Last Name:\t$lastname\n Gender:\t$gender\n Age:\t$age\n Province:\t$province\n City:\t$city\n Postal Code:\t$postal\n Email:\t$email\n Confirm Email:\t $confirmemail\n Username:\t$username\n Password:\t$password\n Confirm Password:$confirmpassword\n Password Hint:\t$passwordhint\n Xtreme Sports:\t$xtremesports\n Xtreme Level:\t$xtremelvl\n Comment for Bio:\t$commentbio\n Feedback: \t $feedback\n\n IP:\t$REMOTE_ADDR\n\n"; $to = "[email protected]"; $subject = "Sign Up - CanadianXtreme"; $mailheaders = "From: $email<> \n"; $mailheaders = "Reply-To: $email\n\n"; mail($to, $subject, $email, $mailheaders); include("thanksecho.php"); } ?> -------------- the problem that i am having is that everytime someone submits the form. it comes to a page that lists all the form fields and says: Undefined Variable ...... and so on.. |
Oh thanks.. no one just jump out and try to help me all at once here! cuz i can only handle so many ppl trying to help at once... like look at this form! its so full of replies! i dont know what to do!
if you dont know im being sarcastic... thanks again for all your NON help |
Well, here at zelaron we are mainly the off-topic gamers... we dont know much about php...
This forum was a pre-made php script that all we did was install and customize... thats bout' it. For some 'better' php help, go here: http://www.ascenvia.net/forums/index.php?s= |
Quote:
|
though chruser & wetwired knew about PHP...
|
Quote:
Does this help <?php // Add as many Names/ Departments -- e-mail addresses as you want here $eMail[] = array( 'Information', '[email protected]' ); $eMail[] = array( 'TechSupport', '[email protected]' ); $eMail[] = array( 'Billing Questions', '[email protected]' ); ?> <HTML> <HEAD> <TITLE>Mail Me!</TITLE> </HEAD> <BODY> <?php if( ! isset( $HTTP_POST_VARS["EMail"] ) ) { ?> <form method="POST" name="MailForm"> <div align="center"> <center> <table border="0" cellpadding="4" cellspacing="0"> <tr> <td valign="top" align="right">To:</td> <td><select size="1" name="To"> <?php foreach( $eMail as $k => $a ) echo "<option value=\"$k\">$a[0]</option>\n"; ?> </select></td> </tr> <tr> <td valign="top" align="right">From:</td> <td><input type="text" name="From" size="44" maxlength="32"></td> </tr> <tr> <td valign="top" align="right">E-Mail:</td> <td><input type="text" name="EMail" size="44"></td> </tr> <tr> <td valign="top" align="right">Subject: </td> <td> <p align="center"><input type="text" name="Subject" size="44"></td> </tr> </table> </center> </div> <p align="center"><textarea rows="10" name="Body" cols="45"></textarea></p> <p align="center"><input type="submit" value="Send" name="B1"></p> </form> <?php } else { echo "<B>Attempting to send message</b></BR></BR>\n"; if( mail( '"' . $eMail[$HTTP_POST_VARS["To"]][0] . '" <' . $eMail[$HTTP_POST_VARS["To"]][1] . '>', $HTTP_POST_VARS["Subject"], $HTTP_POST_VARS["Body"], 'Return-Path: "' . $HTTP_POST_VARS["From"] . '" <' . $HTTP_POST_VARS["EMail"] . ">\n" . 'From: "' . $HTTP_POST_VARS["From"] . '" <' . $HTTP_POST_VARS["EMail"] . ">\n" . 'Reply-To: "' . $HTTP_POST_VARS["From"] . '" <' . $HTTP_POST_VARS["EMail"] . ">\n" . "X-Mailer: PHP/" . phpversion() . "\n" . "X-From-IP: " . $REMOTE_ADDR ) ) echo "Message Sent Successfully"; else echo "UNABLE To Send Message."; } ?> </BODY> </HTML> --------- Script Ends Here -------- |
All times are GMT -6. The time now is 06:57 PM. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.