//To edit an entry in your database the first thing you need to do is list all the entries in it. The script below will do this. --------------------------------------------------- Please click on a title to edit a listing :

"; $query = "SELECT id, title FROM houses"; $result = mysql_query($query); /* Here we fetch the result as an array */ while($r=mysql_fetch_array($result)) { /* This bit sets our data from each row as variables, to make it easier to display */ $id=$r["id"]; $title=$r["title"]; /* Now lets display the titles */ echo " $title
"; } mysql_close($db); ?> ------------------------------------------------------ // If you click on a link you can edit the entry using in this case a script called 'edit_process.php'. This script is shown below. ------------------------------------------------------
Edit House details
Title :
Details:
Town :
Area :
Post Code :
Image :   View all House Photos

Change the House Details, or alter the photo by typing in the new name for the photo.
"; } mysql_close($db); ?> ----------------------------------------------------------- //The script above looks complicated but the bulk of it is just listing the data out into a html table. Once you have made any change you require hit the save button which will then run the script 'edit_save.php' which is shown below.It also includes an image which won't show up unless you have created the appropriate directory and added images to it. ----------------------------------------------------------- ------------------------------------------------------------ //Obviously you don't want anyone who has access to the internet to add/edit/delete you data. Ensure your pages have some sort of protection script included in them. One is included on the page http://www.stevesims.com/scripts.htm