View Single Post
Old 09-15-2010, 01:10 PM  
96ukssob
So Fucking Banananananas
 
96ukssob's Avatar
 
Industry Role:
Join Date: Mar 2003
Location: If I was in your ass you'd know it
Posts: 12,991
Quote:
Originally Posted by woj View Post
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>";
?>
__________________
Email: Clicky on Me
96ukssob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote