Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
Post PHP Mailform Problem ($_get...)
Reply
Posted 2002-09-01, 05:10 PM
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 = "canadianxtreme@shaw.ca";
$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..
Mike
--------------------------------------
CanadianXtreme Sports Club
www.CanadianXtreme.ca
--------------------------------------
Old
Profile PM WWW Search
Canadianxtreme is neither ape nor machine; has so far settled for the in-betweenCanadianxtreme is neither ape nor machine; has so far settled for the in-between
 
Canadianxtreme
 



 
Reply
Posted 2002-09-07, 10:48 AM in reply to Canadianxtreme's post "PHP Mailform Problem ($_get...)"
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
Mike
--------------------------------------
CanadianXtreme Sports Club
www.CanadianXtreme.ca
--------------------------------------
Old
Profile PM WWW Search
Canadianxtreme is neither ape nor machine; has so far settled for the in-betweenCanadianxtreme is neither ape nor machine; has so far settled for the in-between
 
Canadianxtreme
 



 
Reply
Posted 2002-09-07, 12:53 PM in reply to Canadianxtreme's post "PHP Mailform Problem ($_get...)"
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=
Old
Profile PM WWW Search
tacoX is neither ape nor machine; has so far settled for the in-betweentacoX is neither ape nor machine; has so far settled for the in-between
 
 
tacoX
 



 
Reply
Posted 2002-09-07, 07:35 PM in reply to Canadianxtreme's post "PHP Mailform Problem ($_get...)"
Quote:
Originally posted by Canadianxtreme
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
Wow, that was kinda harsh.
Old
Profile PM WWW Search
Jamesadin is neither ape nor machine; has so far settled for the in-betweenJamesadin is neither ape nor machine; has so far settled for the in-between
 
 
Jamesadin
 



 
Reply
Posted 2002-09-08, 12:31 PM in reply to Canadianxtreme's post "PHP Mailform Problem ($_get...)"
though chruser & wetwired knew about PHP...
Old
Profile PM WWW Search
Sirpullido is neither ape nor machine; has so far settled for the in-betweenSirpullido is neither ape nor machine; has so far settled for the in-between
 
 
Sirpullido
 



 
Reply
Posted 2002-11-05, 10:13 AM in reply to Canadianxtreme's post "PHP Mailform Problem ($_get...)"
Quote:
Originally posted by Canadianxtreme
can anyone help me with my PHP problem

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..
So what are the Undefined Variables? That is a good place to start. Also have you checked your script for syntax errors really close. I don't do web pages, but I may be able to help if you can give me some more information about what is going on in your script. I usually do VB or Lotus Script.

Does this help

<?php

// Add as many Names/ Departments -- e-mail addresses as you want here

$eMail[] = array( 'Information', 'info@bogus.dom' );
$eMail[] = array( 'TechSupport', 'support@bogus.dom' );
$eMail[] = array( 'Billing Questions', 'billing@bogus.dom' );

?>
<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 --------

Last edited by Dasher; 2002-11-05 at 10:20 AM.
Old
Profile PM WWW Search
Dasher is neither ape nor machine; has so far settled for the in-betweenDasher is neither ape nor machine; has so far settled for the in-between
 
 
Dasher
 
 

Bookmarks

« Previous Thread | Next Thread »

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

Posting Rules [Forum 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
Forum Jump


All times are GMT -6. The time now is 09:46 AM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.