Kristian_C Posted December 29, 2006 Share Posted December 29, 2006 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 More sharing options...
Kristian_C Posted December 29, 2006 Author Share Posted December 29, 2006 It aint any errors that comes up, when i test the function it just shows the echo... so i just think it may be a think with my variables but, i really dont know... Link to comment Share on other sites More sharing options...
justsomeguy Posted January 2, 2007 Share Posted January 2, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now