Jump to content

undefined error issue


anthropos9

Recommended Posts

Hello,

My hosting company just changed servers and ever since then I've been getting this error:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Notice: Undefined index: id in e:\html\domains\calvaryefc.com\wwwroot\index.php on line 5
Notice: Undefined index: mid in e:\html\domains\calvaryefc.com\wwwroot\index.php on line 6[/quote]
Here is the relavant code to go along with this:

<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php require("includes/connect.php");
$id = $_GET['id'];
$mid = $_GET['mid'];
?>

Any help is welcome. Thanks.
Link to comment
Share on other sites

the only thing i'd probably suggest is the error_reporting level in the php configuration is set a bit higher than your old host.

whilst i may get slated for this, it's safe enough to ignore notices. a bit of an addition of a htaccess file or using [code]ini_set('error_reporting', 2039);[/code] would mean that notices are ignored. they're more 'Good practice' notices rather than anything that's gonna cause you problems, and in your case because the variable(s) you are trying to access ($_GET['whatever']) havent been defined beforehand. if you want to go down the road of perfect practice, look up 'isset' function. [a href=\"http://www.php.net/isset\" target=\"_blank\"]http://www.php.net/isset[/a]

hope that helps a bit
Cheers
Mark
Link to comment
Share on other sites

[!--quoteo(post=367313:date=Apr 21 2006, 02:03 PM:name=anthropos9)--][div class=\'quotetop\']QUOTE(anthropos9 @ Apr 21 2006, 02:03 PM) [snapback]367313[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hello,

My hosting company just changed servers and ever since then I've been getting this error:

Here is the relavant code to go along with this:

<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php require("includes/connect.php");
$id = $_GET['id'];
$mid = $_GET['mid'];
?>

Any help is welcome. Thanks.
[/quote]

I agree with bullmarky on this one. Those notices aren't errors, but rather warnings. The problem is that you're trying to reference 2 variables that won't exist unless they are passed to the script as url parameters. That may be a perfectly reasonable situation depending on what the script is suppossed to do.
Link to comment
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.