Jump to content

No feedback from simple form


srboj

Recommended Posts

Please i need help!

i wrote a simple form :

<form method="POST" action="welcome.php">

 

        Username: <input type="text" name="username" size="20">

        Password: <input type="password" name="password" size="20">

 

<input type="SUBMIT" value="Submit" name="SUBMIT">

 

and when i enter username and password  and after i press submit button nothing is displayed on welcome.php!!! i really dont understand what is going on.. and what i am doing wrong. here is welcome.php :

 

<?php

echo $_POST['username'];

echo $_POST['password'];

?>

 

Can someone please gime any advice or just opinion..

 

thank you!

Link to comment
https://forums.phpfreaks.com/topic/193254-no-feedback-from-simple-form/
Share on other sites

Try executing it in the same script perhaps?

 

Something like this:

 

<?php
if($_POST['submit'])
{
    echo $_POST['username'];
    echo '<br />';
    echo $_POST['password'];
}
?>

<form method="post" action="">
username: 
<input type="text" name="username" /><br />
password: 
<input type="password" name="password" /><br />
<input type="submit" name="submit" value="Submit!" />
</form>

 

Doubt it solves the problem, but maybe it helps..

That does indicate that php is working on your server and that there is either something wrong with your form or your form processing code.

 

You would need to post all of both files for anyone one to have a chance at seeing what is causing the problem.

You already told us that was not all of the form -

sorry... it is not that.. the form is closed..i just didn't copy paste all of it..

 

If the combined code works, but other code does not, there is something wrong with the code or with what you are doing, such as browsing directly to the file instead of using the URL of the file on your server.

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.