lovephp Posted November 23, 2012 Share Posted November 23, 2012 how do i check if if the name in session $name = $login->username; exist in the table with requested id? below is something that i am trying to get but nothing happening $id =$_REQUEST['id']; $name = $login->username; $result = mysql_query("SELECT name FROM table WHERE id = '$id'"); $auth = mysql_fetch_array($result); if($auth = 1){ echo 'this is valid'; }else:{ lheader("Location: logout.php"); } Link to comment https://forums.phpfreaks.com/topic/271075-check-if-name-exist-in-the-table-with-the-id/ Share on other sites More sharing options...
lovephp Posted November 23, 2012 Author Share Posted November 23, 2012 oops not solved can someone help? Link to comment https://forums.phpfreaks.com/topic/271075-check-if-name-exist-in-the-table-with-the-id/#findComment-1394617 Share on other sites More sharing options...
lovephp Posted November 23, 2012 Author Share Posted November 23, 2012 lol this time its solved for good Link to comment https://forums.phpfreaks.com/topic/271075-check-if-name-exist-in-the-table-with-the-id/#findComment-1394621 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.