jjmusicpro Posted January 23, 2008 Share Posted January 23, 2008 i am passing a varaiable in the url groupid= i only wanted to display a picture when a certain groupid was passed, and not display when a different id for some reason it always shows... <?php $groupid_sent = $_GET['groupid']; if($groupid_sent = '10') { echo '<img src="bestOfSeattle2007.jpg">'; } else { // echo nothing Nothing } ?> Link to comment https://forums.phpfreaks.com/topic/87424-if-else-statement/ Share on other sites More sharing options...
revraz Posted January 23, 2008 Share Posted January 23, 2008 Use == not = if($groupid_sent == '10') Link to comment https://forums.phpfreaks.com/topic/87424-if-else-statement/#findComment-447135 Share on other sites More sharing options...
jjmusicpro Posted January 23, 2008 Author Share Posted January 23, 2008 Use == not = if($groupid_sent == '10') perfect! worked thanks! Link to comment https://forums.phpfreaks.com/topic/87424-if-else-statement/#findComment-447138 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.