<?php include 'connect.php';?>
<?php include 'functions.php';?>
<?php include 'header.php';?>
<?php
if(isset($_GET['user']) && !empty($_GET['user'])){
$user=$_GET['user'];
}else{
$user=$_SESSION['user_id'];
}
$my_id = $_SESSION['user_id'];
$username=getuser($user,'username');
?>
<h3> <?php echo $username; ?> </h3>
<?php
if($user != $my_id){
$check_frnd_query=mysql_query("select id from frnds where (user_one='$my_id' and user_two='$user') or (user_one='$user' and user_two='$my_id')");
if(mysql_num_rows($check_frnd_query) == 1){
echo "<a href=''>already frnd</a> | <a href='actions.php?action=unfrnd&user'> Unfrnd $username</a>";
}else {
$from_query = mysql_query("SELECT 'id' FROM 'frnd_req' WHERE 'from'='$user' AND 'to'='$my_id'");
$to_query = mysql_query("SELECT 'id' FROM 'frnd_req' WHERE 'from'='$my_id' AND 'to'='$user'");
if (mysql_num_rows($from_query) == 1)
{
echo "<a href=''>ignore </a> | <a href='actions.php?action?action=accept&user=$user'> accept </a>";
} else if (mysql_num_rows($to_query) == 1)
{
echo "<a href='actions.php?action=cancel1&user=$user'>cancel</a>";
}else{
echo "<a href='actions.php?action=send&user=$user'> send req</a>";
}
}}
?>
//// i have error in two lines is if (mysql_num_rows($from_query) == 1) & else if (mysql_num_rows($to_query) == 1) plz help me
Ambrish_1 0 Newbie Poster
ryantroop 177 Practically a Master Poster
Ambrish_1 0 Newbie Poster
Ambrish_1 0 Newbie Poster
ryantroop 177 Practically a Master Poster
Ambrish_1 0 Newbie Poster
GliderPilot 33 Posting Whiz
Ambrish_1 0 Newbie Poster
urtrivedi 276 Nearly a Posting Virtuoso
Ambrish_1 0 Newbie Poster
GliderPilot 33 Posting Whiz
Ambrish_1 0 Newbie Poster
GliderPilot 33 Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.