[SOLVED] Another DB Problem with update
Posted: Wed Aug 11, 2004 4:58 pm
This doesnt even update any information.
Code: Select all
<?php
error_reporting(E_ALL);
$id=$_POST['id'];
$description=$_POST['name'];
$select=$_POST['select'];
$author=$_POST['author'];
$story=$_POST['story'];
$pic = $_POST['pic'];
echo $description;
echo $select;
echo $author;
echo $story;
echo $pic;
echo '<br>';
echo $id;
$db = mysql_connect("localhost","sevengfx","du3452");
mysql_select_db("sevengfx_com_-_hosted" , $db) or die("Couldn't open $db: ".mysql_error());
mysql_query("UPDATE joe_preview (name,pic,author,story,type) VALUES ('$description','$pic','$author','$story','$select') WHERE id='$id'");
//mysql_query("UPDATE joe_preview ,name='$description', author='$author', story='$story', pic='$pic', type='$select' WHERE id='$id'");
echo "News Updated<br>";
echo '<a href="../index.html">Click here to Continue</a>';
mysql_close($db);
?>