Jump to content


Photo

forms, hidden fields, and variables


  • Please log in to reply
1 reply to this topic

#1 Dville

Dville
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 07 July 2006 - 01:10 AM

so here's my code

http://www.phpfi.com/128426

you can see on line 50, from a cookie, a string is being put into the variable $username

also on line 96 i start a php form. What I would like to do is take $username, and put it into a hidden field, which i should be able to make hidden with
<input type=hidden

but how can i insert $username into this field. i would use name=username so i can grab it from backend.php
could i do 'value=$username'?

thanks in advanced for anyone who can help.

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 07 July 2006 - 01:28 AM

You would do something like:
<input type="hidden" name="username" value="<?php echo $username ?>">

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users