rdkd1970 Posted May 1, 2011 Share Posted May 1, 2011 I am testing live and the data is downloading to the database but when it goes to the next page it gets this message. Warning: Wrong parameter count for mysql_result() in /home/ebermy5/public_html/html/login.php on line 25 Could not execute query THIS IS MY CODING ANY IDEAS WHERE I AM GOING WRONG. YES I HAVE THE OPEN AND CLOSE PHP? if (@$_SESSION['auth'] != "yes") @include('Connections/connect_to_mysql.php'); $query = "SELECT firstName, lastName FROM `Members` WHERE email='{$_SESSION['id']}'"; $result = mysql_result($query) or die("Could not execute query"); echo "<html> <head><title>New Member Welcome</title></head> <body> <h2 style='margin-top: .7in; text-align: center'> Welcome $firstName </h2>\n"; Quote Link to comment https://forums.phpfreaks.com/topic/235249-can-not-get-results-to-get/ Share on other sites More sharing options...
requinix Posted May 1, 2011 Share Posted May 1, 2011 1. It's mysql_query, not mysql_result. 2. If you use mysql_result then you need to give the right number of arguments. Check the manual. 3. You didn't set $firstName anywhere. You can use any of the mysql_fetch_* functions or a mysql_result. Consider (re)reading any of the numerous PHP+MySQL tutorials out there. Quote Link to comment https://forums.phpfreaks.com/topic/235249-can-not-get-results-to-get/#findComment-1208932 Share on other sites More sharing options...
fugix Posted May 1, 2011 Share Posted May 1, 2011 to use mysql_result...you would have to include 2 parameters...the query and row number $result = mysql_query('SELECT name FROM work.employee'); echo mysql_result($result, 2); Quote Link to comment https://forums.phpfreaks.com/topic/235249-can-not-get-results-to-get/#findComment-1208936 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.