Not able to get value of fiels by using $_POST in PHP
-
Hello, I am beginner in PHP and using Wampserver for Apache, PHP and MySql. I created two file first.php and second.php In first.php i have two text box trough which user can enter data and this first.php call second.php with method = "post" for database access. In second.php i am not getting values of textboxes using $_POST variable. Please help me why i m not getting value. Thanks Vipin
-
Hello, I am beginner in PHP and using Wampserver for Apache, PHP and MySql. I created two file first.php and second.php In first.php i have two text box trough which user can enter data and this first.php call second.php with method = "post" for database access. In second.php i am not getting values of textboxes using $_POST variable. Please help me why i m not getting value. Thanks Vipin
It is important to make sure PHP is working on your webserver. What output are you getting? Here is an example which should work: 1. first.php
<form method="post" action="second.php"> <input type="text" name="field1" /> <input type="submit" value="Send data" /> </form>
2. second.php<?PHP // print variables from POST scope. print_r($_POST); ?>
Good luck :)