hey there.... so i have a database, and in this database i have an administration section where you can add records, edit records and delete records.... they all work properly except the edit function
in my edit function i display what the variables (name, address etc) are set to.... i put them into text boxes (so they can be edited) inside a table.... here is where the problem is.... if the name contains an apostrophe only the part after the apostrophe is shown (ex. Mike's Shop would only show as Mike in the name text box).... i can echo the $name variable before my table and it will show the proper thing (ie. it will show Mike's Shop), but once i put the $name variable in the text box it gets cut off
here is the part of my code that is causing me problems:
echo "<form name='search' action='show_changes.php' method='post'>";
while($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
extract($row);
echo "$name";
echo "<table cellpadding='0' border='1' width='50%'>";
echo "<tr><td valign='top' width='25%'><b>Name: </b></td>";
echo "<td><input type='text' name='edit_name' value='$name'></td></tr>";
echo "<tr><td valign='top' width='25%'><b>Address: </b></td>";
echo "<td><input type='text' name='edit_address' value='$address' size='25%'></td></tr>";
echo "</table>";
echo "<input type='submit' name='save_changes' value='Save changes'>";
i have tried everything i can think of and nothing seems to work... also my magic quotes is set to on.... so when the admin user adds a record its getting added with the \ in it (ie. the record would get added as Mike\'s Shop)
any help with this would be greatly appreciated