helpchrisplz
asked on
php search results that have link on them
hey people.
i have a search box that posts to my search.php page and i have it displaying UserName and userID and UserEmail according to the search term
i am trying to add a link to go to that users profile. am not sure how to add this?
here is a screen shot what it look like:
thank you
i have a search box that posts to my search.php page and i have it displaying UserName and userID and UserEmail according to the search term
i am trying to add a link to go to that users profile. am not sure how to add this?
here is a screen shot what it look like:
thank you
$query="SELECT * FROM members WHERE UserName OR UserEmail LIKE '%".$Search."%'";
$result=mysql_query($query) or die ("bad query '$query' : ".mysql_error());
if (mysql_num_rows($result)>0) {
while ($res=mysql_fetch_array($result)) {
echo $res['UserEmail'].'<br>';
echo $res['UserName'].'<br>';
echo $res['MemberID'].'<br>';
}
}else{
echo 'No results';
}
search.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can retreive that with $_GET['id'],
but these are really the basics. Perhaps you should read some PHP tutorials first.
but these are really the basics. Perhaps you should read some PHP tutorials first.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes thank you :)
ASKER