| (resolved)If statements in php | |
|---|---|
| Tweet Topic Started: Apr 20 2009, 06:53 PM (205 Views) | |
| cyrus709 | Apr 20 2009, 06:53 PM Post #1 |
|
Alright this question may seem simple but im missing something here, and i dont know what it is. But the code is not working.
alright here is what that code is doing: 1) starts a session 2)it then gets information with the GET function 3) it then changes the get variable into another variable, this might not have been necessary but i did it anyways. 4)it then connects to the server, obviously i have taken out DBnames, and DBpass etc. 5) The next part selects the column, and the name. 6) now we are at the "if" statement. It selectcs from the "image" column to see if "Images/MapBG.png" is the image, if it is then it updates the DB. if not it it runs the else statement and prints that the coordinates are already taken, Once it actually prints it, then i will change the print command to a the DIE() function. Now the problem is that my else statement is not working. I can switch whats in the parameters of the if statement and it still runs the IF statement. i can print $png (which is the variable inside of the if statement) so i know that it is not the variable. The only thing that i can think of is i messed up my if statement, and thus my else statement?[/QUOTE] [merged double post] Sorry i found my error, i should have put "==" instead of "=". I ended up rewriting the whole thing, as there were multiple errors in this script. Edited by Darksorrow131, Apr 21 2009, 05:52 PM.
|
| Therapy is expensive, poppin' bubble wrap is cheap! You choose. | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Web-Based Programming Support · Next Topic » |






10:18 AM Jul 11