variable as hidden value in a form

eskimo

New Member
Hello

I am working on a form submit thingy for my new site (php). On the page wit the form, I generate a random 16 digit srting, which is then to be used to verify the users post. This works fine.

Except...

I want to declare the value of the random string as a hidden form variable ($activatecode), something like:

<input type="hidden" name="random" value= "<?php $activatecode ?>">

I need to do this so when the form is processed on the next page, the value of @activatecode is stored in my database, to be used later to activate the users posting.

It doesnt seem to be working? The $activatecode variable is being created by my random string function correcly, and everything else being passed as hidden, and non-hidden values by the form to the next page is working perfect

What is the correct syntax for declaring a variable as a value in a hidden form field
 

bren2010

New Member
Are you sure that your PHP is getting the variable by the name "random" not "activatecode", or that your form and PHP are using the same transfer method (GET or POST)?

Those may be your problem.
 
Top