Jump to content

Recommended Posts

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

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/54976-solved-help-please/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.