I got some values from a previous PHP file
EX:
<?php
$value = $_GET['title'];
$value1 = $_GET['name'];
$value2 = $_GET['age'];
$value3 = $_GET['institution'];
?>
Now i have a form field like following
<body>
<form action="pare.php" method="post">
<label>Title:</label>
<input type="text" name="title" size="50"/><br/>
<label>Name:</label>
<input type="text" name="name" size="50"/><br/>
<label>age:</label>
<input type="text" name="age" size="50"/> <br/>
<label>Institution:</label>
<select name="institution">
<option value="">-- Select --</option>
<option value="abc">abc</option>
</select><br/>
<label></label>
<input type="submit" value="submit" /><br/>
</form>
</body>
Now what i want to do is display the values in a PHP file($value,$value1…)in their respective form field boxes.
If the user wants to edit those values($value,$value1…) he must be able to edit and submit those values.
how can i do this?
note the use of htmlspecialchars. It prevents any HTML metacharacters (
"in particular) within the data from ‘breaking’ your form – e.g… it prevents HTML injection attacks.