Phpfr3ak Posted January 21, 2012 Share Posted January 21, 2012 Pretty simple, when a crews created it will divert to this page with the url extension ?Show=Created surely the following code should do this? <? if($_GET['Show']=="Created") echo "Crew created successfully!<br> You can now use the invite option under the CREWS menu to invite other players to join you."; ?> Quote Link to comment https://forums.phpfreaks.com/topic/255453-surely-this-should-work/ Share on other sites More sharing options...
trq Posted January 21, 2012 Share Posted January 21, 2012 It does work. Quote Link to comment https://forums.phpfreaks.com/topic/255453-surely-this-should-work/#findComment-1309722 Share on other sites More sharing options...
AyKay47 Posted January 21, 2012 Share Posted January 21, 2012 Pretty simple, when a crews created it will divert to this page with the url extension ?Show=Created surely the following code should do this? <? if($_GET['Show']=="Created") echo "Crew created successfully!<br> You can now use the invite option under the CREWS menu to invite other players to join you."; ?> what exactly is the point of this thread? Are you having an issue? The only way that I can think of as to why this little snippet of code would not work is if your PHP settings has the "short_tags" directive disabled Quote Link to comment https://forums.phpfreaks.com/topic/255453-surely-this-should-work/#findComment-1309723 Share on other sites More sharing options...
Phpfr3ak Posted January 21, 2012 Author Share Posted January 21, 2012 Odd I'm getting You can now use the invite option under the CREWS menu to invite other players to join you."; ?> Echo'd when ?Show=Created isn't even being used, also never seen an end php tag being echod before, testing this on easyphp could be why maybe? Quote Link to comment https://forums.phpfreaks.com/topic/255453-surely-this-should-work/#findComment-1309724 Share on other sites More sharing options...
Pikachu2000 Posted January 21, 2012 Share Posted January 21, 2012 Change your open tag to full <?php syntax instead of lazy, short <? syntax and see if that doesn't fix it. Quote Link to comment https://forums.phpfreaks.com/topic/255453-surely-this-should-work/#findComment-1309725 Share on other sites More sharing options...
Phpfr3ak Posted January 21, 2012 Author Share Posted January 21, 2012 Wow, that fixed it never seen that issue before, Thanks going to stop using the lazy method now for sure. Quote Link to comment https://forums.phpfreaks.com/topic/255453-surely-this-should-work/#findComment-1309726 Share on other sites More sharing options...
Pikachu2000 Posted January 21, 2012 Share Posted January 21, 2012 Good idea. Short tags are no longer enabled by default, and may or may not work depending on the server configuration. Full tags will work regardless of the server configuration, so using them helps keep your code as portable as possible. Quote Link to comment https://forums.phpfreaks.com/topic/255453-surely-this-should-work/#findComment-1309728 Share on other sites More sharing options...
Pikachu2000 Posted January 21, 2012 Share Posted January 21, 2012 Short open tags not being enabled is not the problem. Using short tags is the problem. That setting is completely irrelevant with respect to php's tags when full tag syntax is used. Quote Link to comment https://forums.phpfreaks.com/topic/255453-surely-this-should-work/#findComment-1309734 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.