Jump to content

can not get results to get


rdkd1970

Recommended Posts

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";

Link to comment
https://forums.phpfreaks.com/topic/235249-can-not-get-results-to-get/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.