Problem updating post on a basic weblog system

From: Date: Thu, 12 Sep 2002 18:18:27 +0000
Subject: Problem updating post on a basic weblog system
Groups: php.general 
Request: Send a blank email to php-general+get-116191@lists.php.net to get a copy of this message
Hello all, I've got a bit of a code problem that's been baffling me for a while now. I'm working on a basic weblog system for personal use, using MySQL. I've got the "new post" and "delete a post" aspects working fine, but for some reason, I can't get the "update a post" part happening. What happens is I select a post to update, and then the post comes up in a textarea box. You then make your update, and submit. Doing this calls the following function: function updateBlog($input,$edit_blog) { include 'db_connect.php'; $update_query = "update $table set blog='$input' where id='$edit_blog'"; if(mysql_db_query ($database, $update_query, $link)) { print "Successfully Edited!!"; }else{ print "no"; } The variables being passed to the function are: $input = "The body of the post" and $edit_blog = id # of post At this point everything appears to have been a success. The "Successfully Edited!!" confirmation appears, and everything seems fine, but when I look at my database, nothing has been updated or changed in any way. Does anyone have any suggestions or help they could lend me? I've been facing this problem for a while now, and can't seem to get my head around it. You can view the entire code here: http://soniceast.d2g.ca/~jalaw/blog/admin.txt Thanks a bunch for any help, Jesse Lawrence ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca

« previous php.general (#116191) next »