shane18 Posted December 18, 2009 Share Posted December 18, 2009 Why does: if(!mysql_connect("LOCALHOST","USERNAME","PASSWORD") && !mysql_select_db("DATABASE")){ echo "FAIL"; } not work? it doesn't connect me to the mysql server/database.... but if i don't have it all in one if it works... Link to comment https://forums.phpfreaks.com/topic/185548-error-handling/ Share on other sites More sharing options...
shane18 Posted December 18, 2009 Author Share Posted December 18, 2009 huh, i changed the && to || and it worked... anyone care to explain why i couldn't connect to my mysql database when it was &&??? Link to comment https://forums.phpfreaks.com/topic/185548-error-handling/#findComment-979599 Share on other sites More sharing options...
shane18 Posted December 18, 2009 Author Share Posted December 18, 2009 i thought if u declared something in a if statement.... like variables... or functions it worked... can someone explain to me how this works with if statements? Link to comment https://forums.phpfreaks.com/topic/185548-error-handling/#findComment-979605 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.