Quote:
Originally Posted by woj
in that 2nd file, you need use $_POST instead of $row, but still I hope you are just playing around and aren't actually planning to use this on a live site, that code is full of holes...
|
its just something I am messing around with, but no wont be anything public.
i changed the $row to $_POST and still not storing in the DB. I changed the file permissions to 777 from 644... any other suggestions
PHP Code:
<?php
mysql_connect("localhost","username","password") or die("Error: ".mysqlerror());
mysql_select_db("db_name");
$id = $_POST['ID'];
$value = $_POST['value'];
$text = $_POST['text'];
$image = $_POST['image'];
$sql = "UPDATE `ring` SET `value` = '$value',`text` = '$text',`image` = '$image' WHERE `ring`.`ID` = '$id' LIMIT 1";
mysql_query($sql) or die ("Error: ".mysql_error());
echo "Database updated. <a href='editinfo.php'>Return to edit info</a>";
?>