0

Hello

I have tow queries on my website. A first query that extracts a number of records from my "Tutors" database based on the criteria "Location". This query works fine and returns "Id", "Name" and "HourlyRate".
I want my user to be able to see an extended profile for each record so I have for each record the following code:

$tmp = $row['Id'] ;
echo "<td> <a href = \"tutor_profile.php?id=" .$tmp ."\"> See Profile </a></td>";

The code on my tutor_profile.php page is:

$id=$_GET['id'];
$result = Mysql_query("	
SELECT * 
FROM `Tutors`
WHERE `Id` = '$id'
");

echo "Name: ".  $row['Name'];

But this second query returns nothing.

Any idea why? Thank for your help!

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by praveen_dusari
-1

Hello

I have tow queries on my website. A first query that extracts a number of records from my "Tutors" database based on the criteria "Location". This query works fine and returns "Id", "Name" and "HourlyRate".
I want my user to be able to see an extended profile for each record so I have for each record the following code:

$tmp = $row['Id'] ;
echo "<td> <a href = \"tutor_profile.php?id=" .$tmp ."\"> See Profile </a></td>";

The code on my tutor_profile.php page is:

$id=$_GET['id'];
$result = Mysql_query("	
SELECT * 
FROM `Tutors`
WHERE `Id` = '$id'
");

echo "Name: ".  $row['Name'];

But this second query returns nothing.

Any idea why? Thank for your help!

hi, first you check whether the $ib come from tutors page
put echo in tutor_profile page check $id value come or no. you using $_get method, try once with $_request method also.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.