gautamphp Posted September 14, 2007 Share Posted September 14, 2007 Hi, I make a simple login form and save it as:- 1.php Codding is as :-- <html> <body> <h3>Logon Page</h3> <form name="Logon" action="welcome.php" method="post"> <table border="0"> <tr> <td>Account: </td> <td><input type="text" name="Account" size="10"></td> </tr> <tr> <td>Password: </td> <td><input type="password" name="Password" size="10"></td> </tr> </table> <input type="submit" name="SubmitButton" value="Submit"> </form> </body> </html> but when i click on Submit button it gives an erron in welcome.php file which coding is as:-- <?php $a = "$_post['Account']"; $p = "$_post['Password']"; echo "Account:", $a;<br> echo "Password:", $p; ?> So, plz tell me why here an error is occure and do't display welcome.php file while clicking on Submit button from 1.php file. Thanks......... Jitu Quote Link to comment https://forums.phpfreaks.com/topic/69319-error-in-my-welcomephp-while-running-it/ Share on other sites More sharing options...
MadTechie Posted September 14, 2007 Share Posted September 14, 2007 change $a = "$_post['Account']"; $p = "$_post['Password']"; to $a = $_POST['Account']; $p = $_POST['Password']; please use code tags next time Quote Link to comment https://forums.phpfreaks.com/topic/69319-error-in-my-welcomephp-while-running-it/#findComment-348315 Share on other sites More sharing options...
gautamphp Posted September 14, 2007 Author Share Posted September 14, 2007 Hi, I change my code with your code but still it gives an error. error is as:-- Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\welcome.php on line 5 So, tell me what should i do??? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/69319-error-in-my-welcomephp-while-running-it/#findComment-348319 Share on other sites More sharing options...
MadTechie Posted September 14, 2007 Share Posted September 14, 2007 full code <html> <body> <h3>Logon Page</h3> <form name="Logon" action="welcome.php" method="post"> <table border="0"> <tr> <td>Account: </td> <td><input type="text" name="Account" size="10"></td> </tr> <tr> <td>Password: </td> <td><input type="password" name="Password" size="10"></td> </tr> </table> <input type="submit" name="SubmitButton" value="Submit"> </form> </body> </html> <?php $a = $_POST['Account']; $p = $_POST['Password']; echo "Account:, $a"; echo "Password:, $p"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/69319-error-in-my-welcomephp-while-running-it/#findComment-348335 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.