Jump to content

A numrows check that dont work :s


Kristian_C

Recommended Posts

if($_POST['setsted'] && $_POST['sted']){$sted=$_POST['sted'];$postid=$_POST['postid'];$avisidse=mysql_query("SELECT id FROM avissider WHERE avis='$avis->navn'");$seaviss=(mysql_num_rows($avisidse));if($postid != $seaviss){echo"That newspaper is not yours.";}else{

Anyone here that can see something wrong? :s ->Kristian_C

Link to comment
Share on other sites

Change this:

$avisidse=mysql_query("SELECT id FROM avissider WHERE avis='{$avis->navn}'");

But also check your if statement:if($postid != $seaviss){That will be true if $postid is not equal to the number of rows. So if $postid holds a specific ID number, you are comparing that with the number of rows that match a certain condition.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...