Jump to content

Click on record to open another page with full details


Gotharious

Recommended Posts

Hello there,

 

I'm trying to make when you click on a record, it opens another page with full details about this record

 

the code for it is

 

  <td><a href=\"user.php?id=".$row['id']."\">".$row['id']."</a></td>

 

and it's working right, but when it opens the other page, no records is shown about the user with that ID

 

So I figure the problem that I need to pass $row['id'] to my second page and make it search for it in the database

 

how can I do that?

 

here is the code from the second page (details of the record)

 


	$dbObj = new DB();
	$result = mysql_query("select * from users where id = '$userID'");
	return $result;



	$row = @mysql_fetch_array($result);
	echo "<table width=98%>";       
	        echo "<tr>";
		echo "<td valign=\"top\" width=\"120px\">";
		$rowid = $row['id'];
		echo "<td valign=\"top\">";
		echo "<table>
			<tr>
			<td valign=\"top\" class=\"searchtitle\">
			".$row['fname']. '  ' .$row['mname']. '  ' .$row['lname']."
			</td>
			</tr>
			<tr>
			<td class=\"text\" valign=\"top\">
			".$row['mobile']."
			</td>
			</tr>
			<tr>
			<td>
			<a href=\"user.php?id=".$row['recruiterid']."\" class=\"link\">".$row['recruiterid']."</a>
			</td>
			</tr>
		</table>";
		echo "</td>";
		echo "</tr>";
	echo "</table>";

It's not defined, that's what I'm saying, I want to define it to the user ID in the first line of code i posted so I can use it in the second page to display details of a user, I just don't know how to define it between those two pages

 

I was following a blog post, and they used that return, but no luck following their instructions anyway

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.