Jump to content

Error in my welcome.php while running it..


gautamphp

Recommended Posts

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

 

 

Link to comment
https://forums.phpfreaks.com/topic/69319-error-in-my-welcomephp-while-running-it/
Share on other sites

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";

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.