Page 1 of 1

conserve name

Posted: Thu Feb 27, 2003 1:27 pm
by micknic
script of b.php

<html>
<body>
<form action="a.php" method="post">
<input type="text" name="ohoh" value="">
<input type="submit" value="essai">
</form>

script of a.php

<?php
$aa=$_POST["ohoh"];
echo $aa;
?>
<html>
<body>
<form action="c.php" method="post">
<input type="hidden" name="dd" value=<?php echo $aa; ?>>
<input type="submit" value="ojdoj">
</form>
</body>
</html>

script of c.php

<?php
$fgf=$_POST["dd"];
echo $fgf;
?>


My question is:
if in b.php I type Gustave Trossard, $_POST["ohoh"]=Gustave Trossard. In c.php $fgf is Gustave. Can someone tell me why Trossard desappear and explain me how to resolve this problem???

Kindest regards

Micka :wink:

Posted: Thu Feb 27, 2003 2:25 pm
by volka
value=<?php echo $aa; ?>
you're not quoting the value.
:arrow:

Code: Select all

&lt;input type="hidden" name="dd" value=Gustave Trossard&gt;
but the browser cannot know that Trossard belongs to value. Could be a new property the browser does not know of. try

Code: Select all

<input type="hidden" name="dd" value="<?php echo $aa; ?>">