Jump to content

hidden value


crouchjay

Recommended Posts

I have created a value and want to post it on the next page so:
[code]$value=$_POST['value'];
<input type="hidden" name="<?php echo $value; ?>" />
url...?value='.$value.'[/code]
but when I put the cursor over the link the value is shown blank, but I know there is a value there. Is this the correct sequence of steps if you want to save a value to use later?

Jay,
Link to comment
Share on other sites

I hope that isn't an exact copy of the code... I assume the last part is pseudo code.

But I guess I'm not sure why you're creating a hidden input if you're sticking it right into a URL.
Link to comment
Share on other sites

  • 2 weeks later...
Hi there,

I can't really understand your code though i understand what you are trying to achieve.

The problem that i can spot in your code is in the line
[code]<input type="hidden" name="<?php echo $value; ?>" />[/code]
it should be
[code]<input type="hidden" name="value" value="<?php echo $value; ?>" />[/code]

If this does not solve your problem, please post the code of your link also (which i assume is the last line of your code)

HTH
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.