Page 1 of 1

variable transmission problem from php form

Posted: Tue Feb 10, 2004 3:36 pm
by orangeapple
Hi.

have a problem with the transmission of a variable which is not in a field from a php form to a php file. This syntax :

<form name="FormName" action="newuseranswer.php?randompass=$randompass" method="post">

doesn't work, the variable randompass isn't transmitted.

Who can help ?

Posted: Tue Feb 10, 2004 4:57 pm
by Dr Evil
You can not send a variable in the URL (GET) as you send a form (POST).
Instead you must create a hidden field in your form:

Code: Select all

<input type="hidden" name="randompass" value="<?=$randompass;?>">
Hope this helps.

Tu es à Genève ? Où ça ?


Dr Evil

Posted: Tue Feb 10, 2004 5:20 pm
by orangeapple
Nickel, merci !

Suis à Vernier, vers Balexert.
Et toi ?

Posted: Tue Feb 10, 2004 5:25 pm
by Dr Evil
Your welcome !

Je suis à Nyon.

Posted: Tue Feb 10, 2004 8:15 pm
by McGruff
Ah I should have paid more attention in French classes.

The only things I (half) remember are:

"vous ette un supair nana!"

and:

"vous ette un [censored] de chevalier!"

You can probably guess the kind of school I went to, and the kind of trouble I landed in when I got them mixed them up.