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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.