Jump to content

Problem POST variable


opstabom

Recommended Posts

your not defining a file to handle the form? Unless there is a file called index.php in the login directory?

 

show us how you are trying to retrieve vars out of the POST array?

 

below code should work

 

handle.php

<?php

if(isset($_POST['submit'])) {

$name = $_POST['username'];

?>

 

form.php

 


<form action="handle.php" method="post">
<input type="text" name="username">
<input type="submit" name="submit" value="Login">
</form>

 

Put both files in the same directory and see if it works...

I posted for example admin and POST array is empty when I use POST and GET array is empty when I use Get method.

No I just copy and paste from my old projects and there all worked fine I don't now where is problem.I copy and paste this form to simple script and all functions fine.

so do you still have a problem? Can you sure your whole code because i don't really understand what the problem is apart from the POST and GET arrays are empty. And in the example i gave you which is similar to what you posted does that work fine?

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.