I need the value of submit button when form is posted in existing text field. and below is the code.
I trying out but it is creating a new text field.
<?php
$var1 = $_POST['hello'];
//below here i am trying out something but not getting in exiting textfield.
//i need the value of submit button ie some value in exiting textfield ie text1
echo "<input type='text' name='text1' value='$var1'>";
?>
<form method="post">
<input type="submit" name="hello" value="some value">
<input type="text" name="text1" value="dskfjls">
</form>
It would create a new text field, because that’s what you’re
echois doing.Just change it do:
Edit in reply to comment
Use this: