
March 29th, 2004, 07:40 PM
|
|
|
|
Join Date: Apr 2007
Location: Toronto
Posts: 8
Time spent in forums: 18 sec
Reputation Power: 0
|
|
|
can't seem to update
I'm having trouble with two separate file for the same site. I created a page with an input box for comments where you can add a comment and it will be added to the list without overwriting the existing comments. The weird thing is, it was working and then it stopped without me making any changes to the file.
(i've removed the html table tags)
php Code:
Original
- php Code |
|
|
|
<? $comm_date = date("m/d/Y"); if($submit2==1) { $comments = "$initials: $comments-$comm_date"; $comments = "$a_comments $comments"; $break = "<br>"; $comments = "$comments $break"; $edit = "update authors set a_comments='$comments' where auth_id='$author_id'"; $aut_database= mysql("db_ifoa", "select a_comments from authors where auth_id='$author_id'"); $count++; $i=1; while ($i<$count) { $i++; } echo "New Comment: </td><td>"; echo "<form name='form1' method='post' action='aut_det.php'>"; echo "<textarea name='comments' cols='30' rows='5' id='comments'></textarea>"; echo "<br><br>Your comment has been added."; echo "<input type='hidden' name='submit2' value='1'>"; echo "<input type='hidden' name='author_id' value='$author_id'>"; echo "<input type='hidden' name='initials' value='$initials'>"; echo "<br><input type='submit' class='main' value='Add comment'>"; }
I can't for the life of me figure out why it just stopped working.
I also have two other pages which are supposed to update the database and they just wont work.
Is it possible that somehow my permissions are messed up?
when I put in the 'or die' statement it give me that error but I know that it's connecting to the db because it has no problem retrieving data from it.
help! any suggestions?
|