colap Posted October 6, 2009 Share Posted October 6, 2009 else if($submitted_by_admin=$_POST['submitted_by_admin']=='yes_admin') { // echo "admin:".$submitted_by_admin; include("database_connector.php"); $admin_id = $_POST['admin_id']; $admin_password = $_POST['admin_password']; $cmd1=mysql_query("select *from admin_info where user_name='$admin_id' AND password='$admin_password'"); $row1=mysql_fetch_array($cmd1); ****************/error $count1=mysql_num_rows($cmd1); ****************/error Error is shown on last two lines. Link to comment https://forums.phpfreaks.com/topic/176753-solved-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/ Share on other sites More sharing options...
mikesta707 Posted October 6, 2009 Share Posted October 6, 2009 your query is failing. add an or die(mysql_error()); at the end of your query and see what message you get Link to comment https://forums.phpfreaks.com/topic/176753-solved-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/#findComment-931891 Share on other sites More sharing options...
nafetski Posted October 6, 2009 Share Posted October 6, 2009 You are not getting any results back off your query. Try running your SQL straight and see what you get Also, no reason to re-declare variables. $cmd1=mysql_query("select *from admin_info where user_name='".$_POST['admin_id']."' etc Link to comment https://forums.phpfreaks.com/topic/176753-solved-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/#findComment-931893 Share on other sites More sharing options...
colap Posted October 6, 2009 Author Share Posted October 6, 2009 Solved. Link to comment https://forums.phpfreaks.com/topic/176753-solved-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/#findComment-931901 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.