Jump to content

Multi Numbers problem


Chevy

Recommended Posts

I am trying to get multiple number is 1 if statement here is an example

[code]
if ($latitude==1||2||3||4||5 AND $longitude==1||2||3||4||5){
[/code]

It doesn't work the way I want it to, I want every cordante from long 1, lat 1 to long 5,lat 5
Link to comment
Share on other sites

I tried

[code]if (($latitude==1||2||3||4||5) && ($longitude==1||2||3||4||5)){[/code]

No luck on 6,6 I still got the massage

[code]
$latitude = $row['latitude'];
$longitude = $row['longitude'];
$totalfish = $row['totalfish'];

if ($process == play){

if (isset($_POST["right"])) {$latitude++; mysql_query("UPDATE table SET latitude='$latitude' WHERE username='$MySN'")
or die(mysql_error());}
if (isset($_POST["left"])) {$latitude--; mysql_query("UPDATE table SET latitude='$latitude' WHERE username='$MySN'")
or die(mysql_error());}
if (isset($_POST["up"])) {$longitude++; mysql_query("UPDATE table SET longitude='$longitude' WHERE username='$MySN'")
or die(mysql_error());}
if (isset($_POST["down"])) {$longitude--; mysql_query("UPDATE table SET longitude='$longitude' WHERE username='$MySN'")
or die(mysql_error());}

if ($latitude==1||2||3||4||5 AND $longitude==1||2||3||4||5){
        echo "Testing this cordnate!";
}

[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.