Jump to content

print out value from a submit form


xbl1
 Share

Recommended Posts

Hello; :) I tried to print out some value which from a submit form, but i could not, could you tell me why, please.

<html><body>	   <ceneter>	  <form action="submitR.php" method="post">		  User Name:		  <input type="text" name="UserName" maxlength=2><br>		 		  Topic:		  <input type="text" name="Topic" maxlength=2> <br>		  Content:<br>		  <TEXTAREA name="content" clos=50 rows=10 onkeyup="this.value = this.value.slice(0, 200)"></TEXTAREA>		  <br>		  <INPUT type="submit" value="submit"> <INPUT type="reset">		  </form>		 </ceneter>		  </body></html>

in the submitR.php file<?echo "$REQUEST_['topic']";echo "$REQUEST_['content']";echo "$REQUEST_['username']";?>

Link to comment
Share on other sites

Variables in PHP are represented by a dollar sign followed by the name of the variable. The variable name is case-sensitive.
so, change variable names to
<?echo $_REQUEST["UserName"];echo $_REQUEST["Topic"];echo $_REQUEST["content"];?>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...