ryanfilard Posted June 23, 2011 Share Posted June 23, 2011 <?PHP if ((!empty($_SESSION['MM_Username'])) && $row_recordmeq['blockera'] == '1' && ($_SESSION['MM_Username']) == '$userverf') echo 'submit'; ?> It does not seem to be working Quote Link to comment https://forums.phpfreaks.com/topic/240222-is-this-correct/ Share on other sites More sharing options...
mikosiko Posted June 23, 2011 Share Posted June 23, 2011 .... It does not seem to be working why?.... be more specific... we don't see what you are seeing Quote Link to comment https://forums.phpfreaks.com/topic/240222-is-this-correct/#findComment-1233920 Share on other sites More sharing options...
ryanfilard Posted June 23, 2011 Author Share Posted June 23, 2011 It does not echo the text "Submit" when are the variables are set correctly. Quote Link to comment https://forums.phpfreaks.com/topic/240222-is-this-correct/#findComment-1233921 Share on other sites More sharing options...
mikosiko Posted June 23, 2011 Share Posted June 23, 2011 debug your code echoing your variables before the if, and see if they have the values that you expect... other than that we can only guess Quote Link to comment https://forums.phpfreaks.com/topic/240222-is-this-correct/#findComment-1233923 Share on other sites More sharing options...
efficacious Posted June 23, 2011 Share Posted June 23, 2011 miko is correct we cannot help unless we know the code that sets the values of the variables your checking in your IF statement.. also why did you put parenthesis around this var? ($_SESSION['MM_Username']) and this var (!empty($_SESSION['MM_Username'])) should probably look more like this !(empty($_SESSION['MM_Username'])) Quote Link to comment https://forums.phpfreaks.com/topic/240222-is-this-correct/#findComment-1233924 Share on other sites More sharing options...
wildteen88 Posted June 23, 2011 Share Posted June 23, 2011 <?PHP if ((!empty($_SESSION['MM_Username'])) && $row_recordmeq['blockera'] == '1' && ($_SESSION['MM_Username']) == '$userverf') echo 'submit'; ?> It does not seem to be working Variables are not parsed within single quotes. Remove the quotes around the $userverf variable Quote Link to comment https://forums.phpfreaks.com/topic/240222-is-this-correct/#findComment-1233927 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.