Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old March 29th, 2004, 07:40 PM
watts watts is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Toronto
Posts: 8 watts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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
  1.  
  2.  
  3. <?
  4. $comm_date = date("m/d/Y");
  5. if($submit2==1) {
  6.  
  7.   $comments = "$initials: $comments-$comm_date";
  8.   $comments = "$a_comments $comments";
  9.   $break = "<br>";
  10.   $comments = "$comments $break";
  11.   $edit = "update authors set a_comments='$comments' where auth_id='$author_id'";
  12.   mysql("db_ifoa",$edit);
  13.                                
  14.   $aut_database=mysql("db_ifoa", "select a_comments from authors where auth_id='$author_id'");
  15.   $count=mysql_numrows($aut_database);
  16.   $count++;
  17.  
  18.   $i=1;
  19.   while ($i<$count) {
  20.              
  21.     list($a_comments)=mysql_fetch_row($aut_database)
  22.     $i++;                       
  23.   }
  24.  
  25.   echo "$a_comments<br>";
  26.  
  27.   echo "New Comment:&nbsp;</td><td>";
  28.   echo "<form name='form1' method='post' action='aut_det.php'>";
  29.  
  30.   echo "<textarea name='comments' cols='30' rows='5' id='comments'></textarea>";
  31.   echo "<br><br>Your comment has been added.";
  32.   echo "<input type='hidden' name='submit2' value='1'>";
  33.   echo "<input type='hidden' name='author_id' value='$author_id'>";
  34.   echo "<input type='hidden' name='initials' value='$initials'>";
  35.   echo "<br><input type='submit' class='main' value='Add comment'>";
  36.  
  37.   echo "</form>";
  38. }


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?

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > can't seem to update


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway