eduardoribeiro Posted June 10, 2007 Share Posted June 10, 2007 I have a website that load every page based on a string in the URL, like this http://server/folderWebiste/index.php?page=contacts&ID=1 In the PHP side I have a script to catch the page to load and then present that page using a case and include. Now I want to load a piece of javascript only when the users request the page contacts, but I keeping getting a blank page with the code I wrote: <?php if ($_GET['page'] = 'contacts') {?> <script type='text/javascript' src='scripts/xmlHttp.js'></script> <script type='text/javascript' src='scripts/functionAddEvent.js'></script> <script type='text/javascript' src='scripts/contact.js'></script> <?php } ?> I think this is the right code, but the server don't generate the page when I put piece of code. Can anyone help me?? Thank you, Best Regards, Eduardo Ribeiro Quote Link to comment https://forums.phpfreaks.com/topic/54976-solved-help-please/ Share on other sites More sharing options...
chocopi Posted June 10, 2007 Share Posted June 10, 2007 try replaceing <?php if ($_GET['page'] = 'contacts') {?> with <?php if ($_GET['page'] == 'contacts') {?> Hope it helps, ~ Chocopi Quote Link to comment https://forums.phpfreaks.com/topic/54976-solved-help-please/#findComment-271837 Share on other sites More sharing options...
eduardoribeiro Posted June 10, 2007 Author Share Posted June 10, 2007 Ok I will try, thank you... Quote Link to comment https://forums.phpfreaks.com/topic/54976-solved-help-please/#findComment-271838 Share on other sites More sharing options...
eduardoribeiro Posted June 10, 2007 Author Share Posted June 10, 2007 Thank you, that was what I'm looking for... Quote Link to comment https://forums.phpfreaks.com/topic/54976-solved-help-please/#findComment-271846 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.