<form action="updated.php">
<?php
//connect to your database ** EDIT REQUIRED HERE **
mysql_connect("localhost","notexper_two","three"); //(host, username, password)
//specify database ** EDIT REQUIRED HERE **
mysql_select_db("notexper_one") or die("Unable to select database"); //select which database we're using
$sql = ("select * from CV where user_id = '". $_SESSION['seeker'] ."'");
$result = mysql_query ($sql);
while ($row = mysql_fetch_array($result))
{
$field1= $row["name"];
$field7= $row["surname"];
$field2= $row["address"];
$field3= $row["address2"];
$field4= $row["county"];
$field5= $row["postcode"];
$field6= $row["country"];
}
?>
<table width=80%><tr><td valign=top>
First Name

/td><td> <input type="text" name="name" value="<? echo $field1; ?>"></td></tr>
<tr><td>Surname

/tD><td><input type="text" name="surname" value="<? echo $field7; ?>"></td></tr>
<tr><td>Address

/tD><td><input type="text" name="address" value="<? echo $field2; ?>"></td></tr>
<tr><td>Address 1

/tD><td><input type="text" name="address2" value="<? echo $field3; ?>"></td></tr>
<tr><td>County

/tD><td><input type="text" name="county" value="<? echo $field4; ?>"></td></tr>
<tr><td>Postcode

/tD><td><input type="text" name="postcode" value="<? echo $field5; ?>"></td></tr>
</table>
<input type="Submit" value="Update">
</form>
Bookmarks