hi,
i am trying to update a feild in my table.
i want to use a str_replce to fix something in the cell.
this is my code:
$sql = "select id,full_desc from products where brand = 'title' and id = '12765'";
$sql_res = mysql_query($sql);
$sql_row = mysql_fetch_array($sql_res);
$id = $sql_row["id"];
$full_desc = $sql_row["full_desc"];
$revised_full_desc = str_replace("/title", "/title/title", $full_desc);
print "$revised_full_desc";
$sq = "UPDATE products SET full_desc = '$revised_full_desc' where id = '12765'";
$res = mysql_query($sq);
it will print the corrected html but then it never UPDATEs the info in that cell.
do i need to close the connection to the tabel first before it updates?
thanks