Jump to content
Elijah23

PHP Script Help

Recommended Posts

Hello, anyone who might know how to fix this, could you please help me?.. :)

I have this PHP script used for my flux cp which is coded by gerome,

<?php if($_GET['module'] == 'main' OR empty($_GET['module'])): ?>

But I'm getting error and showing this logs:

Undefined index: module in /home/user/public_html/themes/designno3/header.php on line 217

I'm really confused cause I don't get error using the CP in my computer but putting this in a live

site gives me this error..

Thanks!.. :)

Link to comment
Share on other sites

Try using pipelines ( || ) instead

<?php if($_GET['module'] == 'main' || empty($_GET['module'])): ?>

Edited by Jupeto
Link to comment
Share on other sites

Try using pipelines ( || ) instead

<?php if($_GET['module'] == 'main' || empty($_GET['module'])): ?>

Still the same error.. sorry for the late reply..

Link to comment
Share on other sites

You have to check if $_GET['module'] is defined BEFORE checking its value.

<?php if( empty($_GET['module']) || $_GET['module'] == 'main' ): ?>

he is right....

i think module doesn't have any value or haven't been declared before that statement of yours...

Link to comment
Share on other sites

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.   Paste as plain text instead

  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

By using this site, you agree to our Terms of Use and Privacy Policy.