Jump to content


Photo

Help with form/variable!


  • Please log in to reply
2 replies to this topic

#1 dandandan

dandandan
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 11 September 2006 - 07:46 AM

my code: (im leaving out things that dont matter, like the body and head tage, to save space)

<form name="form" enctype="multipart/form-data" method="post" action="test.php">
  <p>Your name:
    <input type="text" name="name">
    <input type="submit" name="Submit" value="Submit">
</form>


and the code for test.php (the form action=test.php). im not including the html, only the php.

<?php
print("$name");
?>



now, for some reason, test.php will NOT print $name. I get no error message. just a blank page. here is is uploaded. http://wolfstudios-online.com/email


PLEASE HELP!

#2 btherl

btherl
  • Staff Alumni
  • Advanced Member
  • 3,893 posts
  • LocationAustralia

Posted 11 September 2006 - 07:50 AM

Try print($_REQUEST['name']);

You can also use $_POST['name'], since you are using a post form.

#3 dandandan

dandandan
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 11 September 2006 - 08:03 AM

many thanks, it worked.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users