I have recently started using Xampp for PHP coding.....The problem iam facing is that, i create an HTML form and write tag for it such as "<input type=text name= "textbox">"....when i go to second form and write "echo $textbox"....i don't see any output value that i had entered in the text box on first form.
I have turned Register Globals=On.....$_GET is also not working
I am an old user of IIS server but this the first time iam having such kind of problem, may be coz of Xampp....i am not 2 good with Apache.
Much appreciated f someone helps me out.
Thanx
Unable to receive value from text box to other form!!!!
Moderator: General Moderators
first see what method you are using.
also make sure the form submits to the page where you request the form fields.
Code: Select all
//if form is set as post
$textbox = $_POST['textbox'];
//or get
$textbox = $_GET['textbox'];
echo $textbox;please try
Code: Select all
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
?>
<html>
<head>
<title>http parameter test</title>
</head>
<body>
<pre><?php var_export($_POST); ?></pre>
<form method="post" action="#">
<div>
<input type="text" name="textbox" />
<br />
<input type="submit" />
</div>
</form>
</body>
</html>I hope these will give you a good start to use forms.
http://www.freewebmasterhelp.com/tutorials/php/6
http://www.w3schools.com/php/php_forms.asp
http://www.freewebmasterhelp.com/tutorials/php/6
http://www.w3schools.com/php/php_forms.asp