Solar Posted May 9, 2010 Share Posted May 9, 2010 <?php if ($req_user_info['name'] !=" "){echo "<input type=\"submit\" value=\"Submit\">"; } ?> I have a code like this. If the "$req_user_info['name'] !=" Nothing here " Then it shows the button. How can I put an else if in this statement to make it.. "$req_user_info['name'] !="$session->username " Then disable or do not let the button show. Thanks in Advanced. Quote Link to comment https://forums.phpfreaks.com/topic/201194-quick-question/ Share on other sites More sharing options...
sKunKbad Posted May 9, 2010 Share Posted May 9, 2010 <?php if ($req_user_info['name'] !=" ") { echo "<input type=\"submit\" value=\"Submit\">"; } else { echo "<input type=\"submit\" value=\"Submit\" disabled=\"disabled\">"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/201194-quick-question/#findComment-1055562 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.