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. 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\">"; } ?> Link to comment https://forums.phpfreaks.com/topic/201194-quick-question/#findComment-1055562 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.