If statement no longer works after changing ID field to auto-increment

I don't get this, but ever since I changed the ID fields to auto-increment which is where they should have originally been the page doesn't work anymore.  This is my if statement now, which worked before I changed that setting for the IDs.

<?php
if(isset($_GET['Posted_Comment'])) {

$sql_post = mysql_query("SELECT Posts.intPost_ID, Posts.strTime, Posts.strSubject, Posts.strTitle, Posts.strComment, Posts.strName FROM Posts WHERE intPost_ID = '" . $_GET['intPost_ID'] . "' ") or die(mysql_error());
            
            while($row = mysql_fetch_array($sql_post)) {
            
                  $intPost_ID = $row['intPost_ID'];
                  $strTime = $row['strTime'];
                  $strSubject = $row['strSubject'];
                  $strTitle = $row['strTitle'];
                  $strComment = $row['strComment'];
                  $strName = $row['strName'];
                  
            }

      } elseif(isset($_GET['Reply_Comment'])) {
      
$sql_reply2 = mysql_query("SELECT Replies.intReply_ID, Replies.strTime, Replies.strReply, Replies.strReply_Name, Posts.strSubject, Posts.strTitle, Posts.strComment FROM Posts, Replies WHERE Replies.intReply_ID = '" . $_GET['intReply_ID'] . "' ") or die(mysql_error());
      
            while($row = mysql_fetch_array($sql_reply2)) {
                  
                  $intReply_ID = $row['intReply_ID'];
                  $strTime = $row['strTime'];
                  $strReply = $row['strReply'];
                  $strReply_Name = $row['strReply_Name'];
                  $strSubject = $row['strSubject'];
                  $strTitle = $row['strTitle'];
                  
            }
      }
echo title . $strTitle;
?>
LVL 1
pingeyegAsked:
Who is Participating?
 
OscurochuCommented:
try mysql_fetch_assoc()
0
 
pingeyegAuthor Commented:
Nope that didn't work.
0
 
punkstarCommented:
Take a look at your database table. Does anything look out of place. All ID's looking fine?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
pingeyegAuthor Commented:
Everything appears to be in order.  I tried deleting the ones I inserted and then inserted another one, but still doesn't work.  When I click on reply to that comment the next page doesn't have anything from the db there other than the text from html.
0
 
pingeyegAuthor Commented:
Any clue as to why nothing is showing but the html?
0
 
pingeyegAuthor Commented:
Nevermind I got it.

I calling the ID number instead of the name of the ID number.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.