Jump to content

PHP Script Help


Recommended Posts


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  161
  • Reputation:   31
  • Joined:  12/06/11
  • Last Seen:  

Check if the PHP your webhost is using the right version. Does your webhost have Cpanel?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

Yes it has Cpanel...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   39
  • Joined:  01/20/12
  • Last Seen:  

Try using pipelines ( || ) instead

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

Edited by Jupeto
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   0
  • Joined:  05/20/12
  • Last Seen:  

try to post here the whole script...you are having some problems with the values...check line 217 and post it here please...thnx

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

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

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

i'll check the codes again to find where it was defined, :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   0
  • Joined:  05/20/12
  • Last Seen:  

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...