Jump to content

[SOLVED] How would I be able to tranfer a variable from a search loop when clicked?


Recommended Posts

Example:

while($row = mysql_fetch_array( $result )or die(mysql_error())) {
$NAME=$row['Name'];
$Pic=$row['Picture'];
$PIC="Images/$Pic";

echo "<img src=$PIC $attr alt=\getimagesize ()example\ />";
echo "<a href='Friend.php'>$NAME/a> ";
echo"<br/>";
}
?>

 

How would I be able to isolate the name variable when clicked?

Thanks for trying to help.

But the problem is that I don't know how to transfer the variable when clicked into that session because there are other search results.

I also don't know how to to check if an item was clicked in php.

This would be easier

 

echo "<img src=$PIC $attr alt=\getimagesize ()example\ />";
echo "<a href='Friend.php?name=".$NAME."'>$NAME</a>";
echo"<br/>";

 

Then on Friend.php use $_GET['name']

This would be easier

 

echo "<img src=$PIC $attr alt=\getimagesize ()example\ />";
echo "<a href='Friend.php?name=".$NAME."'>$NAME</a>";
echo"<br/>";

 

Then on Friend.php use $_GET['name']

 

Thankyou so much you have been a big help.

=D

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.