Jump to content

sunny-

New Members
  • Posts

    2
  • Joined

  • Last visited

sunny-'s Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Silvar's Solution Seems to be working.Thank you very much. But why do I have to use another set of varibales just to hold whatever I actaully passed? Isent that a bit of waste of Space? because I am storing the same thing which I already have direct access to. Or is this the way it is done in php? As for the isset() function. I tired it and it seems like the $_POST is actaully set. The new sf.php with the isset() ==== <HTML> <HEAD> <TITLE>The Send Feedback</TITLE> </HEAD> <BODY> <?php_track_vars?> <?php if(isset($_POST)) echo "IT is set."; $msg="Sender's Full Name:\t $sender_name \n"; $msg.="Sender's Email:\\t$sender_email\n"; $msg.="Did you like the Website?\t$like_site\n"; $msg.="Additional Message:\t$message\n\n"; $mailheaders="From: Lord Sunny's Website"; $mailheaders.="Reply-To: $sender_email\n\n"; mail("sunnymay1993@hotmail.com", "Feedback Form From--$sender_name",$msg,$mailheaders); echo"<H1 align=centre> Thank you, $sender_name"; if($sender_name=='yes') echo"<P align=centre> Thank you for Liking our Website.</p>"; else echo"<P align=centre> We will try to improve our website as per your feedback.</p>"; ?> </BODY> </HTML> So it is suppose to print "IT is Set" if isset($_POST) returns a 1; So It is printing, so that means that the variables are passed properly? If so then why does it still say that the Variable is undefined.
  2. Greetings everyone, I am a really new php coder and I got stuck in a problem while writting a practice code. This is about a Feedback page that sends an email after getting the Feedback. The error Recieved basically states that the variables are undefined. so That means there is some problem while passing the values of the variables. I really cannot Figure it out. Please help me. The Feedback Form Page is--- <HTML> <HEAD> <TITLE>The Feedback Form</TITLE> </HEAD> <BODY> <FORM method="POST" action="sf.php"> <p>Your Name: <INPUT type="text" name="sender_name" size=20 maxlength=50> </p> <p>Your Email: <INPUT type="text" name="sender_email" size=20 maxlength=50> </p> <p>Message: <textarea name="message" cols=30 rows=5></textarea></p> <p>Do you like this Website: <INPUT type="radio" name="like_site" value="Yes" checked> yes <INPUT type="radio" name="like_site" value="No"> no </p> <INPUT type="submit" value="SUBMIT"> </FORM> </BODY> </HTML> The Page which is responsible for sending the email is <HTML> <HEAD> <TITLE>The Send Feedback</TITLE> </HEAD> <BODY> <?php_track_vars?> <?php $msg="Sender's Full Name:\t $sender_name \n"; $msg.="Sender's Email:\\t$sender_email\n"; $msg.="Did you like the Website?\t$like_site\n"; $msg.="Additional Message:\t$message\n\n"; $mailheaders="From: Lord Sunny's Website"; $mailheaders.="Reply-To: $sender_email\n\n"; mail("sunnymay1993@hotmail.com", "Feedback Form From--$sender_name",$msg,$mailheaders); echo"<H1 align=centre> Thank you, $sender_name"; if($sender_name=='yes') echo"<P align=centre> Thank you for Liking our Website.</p>"; else echo"<P align=centre> We will try to improve our website as per your feedback.</p>"; ?> </BODY> </HTML> Sorry if I am posting this in an inappropiate forum.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.