Re: Help with form and post!
- From: Martin Jay <martin@xxxxxxxxxxxxxxxx>
- Date: Wed, 31 May 2006 21:00:35 +0100
In message <447dd9b0$1_3@xxxxxxxxxxxxxxxxxxxxxxxxx>, ivo <nomail@xxxxxxxx> writes
Hope you can help me :P
I'm coding an html form with some php vars. Something like this doesn't work:
<form action="./correct.php" method="post">
(xxxxx) <input type="hidden" name="preg1" value="'. $preg .'">
<input submit.....>
</form>
And then in correct.php:
echo $_POST["preg1"]
But if I substitute the line (xxxxx) with this it works!
<input type="hidden" name="preg1" value="sometexthere">
What can I do to make it works using $preg var??
You need to echo $preg to incorporate its value in the HTML element, for example change:
<input type="hidden" name="preg1" value="'. $preg .'">
to:
<input type="hidden" name="preg1" value="<?php echo $preg; ?>">
--
Martin Jay
Phone/SMS: +44 7740 191877
Fax: +44 870 915 2124
.
- Follow-Ups:
- Re: Help with form and post!
- From: robert
- Re: Help with form and post!
- References:
- Help with form and post!
- From: ivo
- Help with form and post!
- Prev by Date: LF: PHP Coder for Registration and admin project
- Next by Date: Re: Help with form and post!
- Previous by thread: Help with form and post!
- Next by thread: Re: Help with form and post!
- Index(es):