Jump to content

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


GB_001

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

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.