jeppers Posted March 6, 2011 Share Posted March 6, 2011 i can't seem to get the statment to work $filename = $f; $name = $n; if ($n == $n){ include_once('test2.php'); mysql_query ("INSERT INTO images (filename) VALUES ('$n')"); }else{ include_once('test2.php'); mysql_query ("INSERT INTO images (filename) VALUES ('$f')"); } when i execute the code it seems only to upload to the database to when the $n values or false.. any ides what i can do.... before the question is asked there is no error code... Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 6, 2011 Share Posted March 6, 2011 Why are you comparing $n to $n? <?php if ($n == $n){ ?> Ken Quote Link to comment Share on other sites More sharing options...
jeppers Posted March 6, 2011 Author Share Posted March 6, 2011 to make sure that it is true and then, run it. if not run the next query. that's how i have been thinking. or should i compare $n == $f? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 6, 2011 Share Posted March 6, 2011 What is this code segment supposed to do? Ken Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.