Possible Duplicate:
variable variables
once I have established the first empty input field I then want to give it the value of $_POST['email'];
by making the value of $key into a variable but how can I make the value of a variable into a new variable (if you see what I mean) I will try to demonstrate what I mean below:
$email = $_POST['email'];
foreach( $_POST as $key=> $for ) {
if($for=="") {
// $ + the value of ($key) = $email;
break;
}
}
email: <input name="email">
a: <input type="text" name="a" value='<?php echo $a; ?>'>
b: <input type="text" name="b" value='<?php echo $b; ?>'>
c: <input type="text" name="c" value='<?php echo $c; ?>'>
<input type="submit">