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

Link to comment
Share on other sites

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

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.