samsbc12 Posted May 26, 2006 Share Posted May 26, 2006 [code]<?//Store username and pass$username="*******";$password="*******";$database="*******";//Variables//Pulls From Form$id=$_POST['id'];$category=$_POST['category'];$name=$_POST['name'];$description=$_POST['description'];$link=$_POST['link'];$mirror=$_POST['mirror'];mysql_connect(localhost,$username,$password);@mysql_select_db($database) or die( "Unable to select database");if($name != ""){$query = "UPDATE links SET category='$category', name='$name', description='$description', link='$link', mirror='$mirror' WHERE id='$id' ";mysql_query($query);mysql_close();echo"<html><title>Addedt</title><style type=\"text/css\"><!--body { background-color: #666666;}--></style></head><body><div align=\"center\"><font color=\"#FFCC00\" face=\"Arial, Helvetica, sans-serif\">Record Updated. </font></div></body></html>";}?><meta http-equiv="refresh" content="2;URL=************">[/code] Quote Link to comment Share on other sites More sharing options...
poirot Posted May 26, 2006 Share Posted May 26, 2006 Try to change this bit of code:[code]mysql_query($query) or die(mysql_error())[/code]It will at least tell you what happened if the query fails.Also, what happens ? Will it output the "Record Updated" page? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.