Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.