Forum Moderators: open

Message Too Old, No Replies

Javascript To Submit Variable

         

sess4561

12:38 pm on Feb 12, 2010 (gmt 0)

10+ Year Member



Hi guys

I was wondering if anyone knew how to populate a variable in PHP from a user submitted textfield, without using POST or GET?

I think this could be done using Javascript but not sure on the method to do so. (onfocus?)

Basically what I want to do is create a unique variable instantly from what the user puts in.

For example:-

//THE FORM
Name: J Smith
Age: 20
DOB: 300181


//PHP
$userref = "abc123";
$thevariable = "JSmith20300181abc123";

The variable would then be included as a hidden field, so when the user submits the information is present.

Any ideas?

Thanks

astupidname

3:02 pm on Feb 12, 2010 (gmt 0)

10+ Year Member



"so when the user submits the information is present."
Well then it is using POST or GET, is it not?

[edited by: Fotiman at 3:23 pm (utc) on Feb 12, 2010]