Skip to main content
Inspiring
May 11, 2007
Answered

_POST or _GET after inserting data

  • May 11, 2007
  • 3 replies
  • 1849 views
I have a registration form and after submitting the values using "POST" as the form action:

I am unable to see the data on the next page that is calling the posted values using:
$username = $_POST['username'];

Now this should work!
I am not sure what is happening???
Any ideas why the data is not being posted?

I have tried this script and you know what the answer is:
This topic has been closed for replies.
Correct answer Westmatrix
Thank you all for help as I have managed to sort it out.
The idea was simple:
Register => Email => Activate => Login |

I have set up the Registration & Email on one page and the Activate and Email on another.
The rest is history.

Thank you once again for help.

3 replies

WestmatrixAuthorCorrect answer
Inspiring
May 11, 2007
Thank you all for help as I have managed to sort it out.
The idea was simple:
Register => Email => Activate => Login |

I have set up the Registration & Email on one page and the Activate and Email on another.
The rest is history.

Thank you once again for help.
Inspiring
May 11, 2007
Hi geschenk
There must be something I am doing wrong here:
I am not asking you to fix my pages but I think I am, if that makes any sense.

I have no idea why "this page" is doing this to me as all my other pages work!
Inspiring
May 11, 2007
Just a note on the form data:
If I use Get as the method it works, don;t ask me why but it does
Also If I remove all server behaviours it also works with POST or GET.

Yes I have updated the testget with relevant info such as:
<?php foreach($_POST as $key => $value) echo "$key => $value <br>";?>
OR
<?php foreach($_GET as $key => $value) echo "$key => $value <br>";?>
OR
Individual statements like before; yes with POST and GET changed.

NO IDEA?
Günter_Schenk
Inspiring
May 11, 2007
>>
If I use Get as the method it works, don;t ask me why but it does
>>

well, if this does solve your problem, then better leave it like that ;-)
Günter_Schenk
Inspiring
May 11, 2007
this will work:

<?php
if (!empty($_POST['username'])) {
echo "your user name is ".$_POST['username'];
}
else {
echo "No username has been selected!";
}
?>
Inspiring
May 11, 2007
Thanks, my form is attached, nothing actually gets POSTED!
Günter_Schenk
Inspiring
May 11, 2007
>>
Thanks, my form is attached, nothing actually gets POSTED!
>>

how comes ? that form does provide a correct "POST" method as well as an "action", and the page defined in action="<?php echo $editFormAction; ?>" should usually be able to receive & check the form values properly -- I checked my code with a regular form and a regular follow-up page, and here it works

BTW, is it possible that the form (and possibly other related pages) have been done using some 3rd party extension ?