php code to check the data returned or not

code

 

 

<?php
include ‘sample.php’;

 

$cat=$_POST[j_category];
$jokenum=$_POST[j_no];
//$udid=$_POST[‘UDID’];
//$likee=$_POST[like_count];
$queryyy=”select j_category,j_no from tbl_sms where j_category=$cat and j_no=$jokenum”;
$result1=mysql_query($queryyy);

 

 

/*while($rw=mysql_fetch_assoc($result1))
{
$rw1=mysql_num_rows($result1);
echo $rw1;
}*/

if(mysql_num_rows($result1)>0)
{
echo “alreadyliked”;
}

else
{
mysql_query(“insert into tbl_sms(j_category,j_no,like_count) values($cat,$jokenum,1)”);
echo “urlike counts”;
}

 

 

?>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s