rdkd1970 Posted May 12, 2011 Author Share Posted May 12, 2011 When I was using the while statement it was welcoming everyone in the db. I changed the while for an if statement it is not producing anything could be how I have it laid out I tried different ways to code it. Here is my latest. $row=mysql_fetch_assoc($result); extract ($row); if ($id == $firstname){ echo "Welcome, $firstname"; Quote Link to comment Share on other sites More sharing options...
rdkd1970 Posted May 12, 2011 Author Share Posted May 12, 2011 Here is another way I tried it will display the Welcome not the name $row = mysql_fetch_assoc($result); if ($id == $row['firstname']){ echo "Welcome, $row['firstname']"; } 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.