1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP Notice: Undefined Index

Discussion in 'Co-op Advertising Network' started by Will.Spencer, Aug 26, 2005.

  1. #1
    Does anyone know why my Apache logs might be filling up with errors like these:

    
    [client 62.232.224.52] PHP Notice:  Undefined index:  PATH_INFO in /var/www/html/fortliberty.org/ad_network_360.php on line 76, referer: http://www.google.co.uk/search?q=how+to+build+a+9mm&btnG=Search&hl=en
    
    [client 62.232.224.52] PHP Notice:  Undefined index:  HTTPS in /var/www/html/fortliberty.org/ad_network_360.php on line 95, referer: http://www.google.co.uk/search?q=how+to+build+a+9mm&btnG=Search&hl=en
    
    Code (markup):

     
    Will.Spencer, Aug 26, 2005 IP
  2. Will.Spencer

    Will.Spencer NetBuilder

    Messages:
    14,789
    Likes Received:
    1,040
    Best Answers:
    0
    Trophy Points:
    375
    #2
    Anyone, anyone, Buehler?
     
    Will.Spencer, Aug 31, 2005 IP
  3. Will.Spencer

    Will.Spencer NetBuilder

    Messages:
    14,789
    Likes Received:
    1,040
    Best Answers:
    0
    Trophy Points:
    375
    #3
    I upgraded to the latest and greatest code, and my log files are still being filled with errors:

     
    Will.Spencer, Aug 31, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    Sounds like you have over zealous error reporting setup for PHP by default. Add this to the beginning of the ad network file:

    error_reporting(E_ALL & ~E_NOTICE);
    PHP:
     
    digitalpoint, Aug 31, 2005 IP
    Will.Spencer likes this.
  5. Will.Spencer

    Will.Spencer NetBuilder

    Messages:
    14,789
    Likes Received:
    1,040
    Best Answers:
    0
    Trophy Points:
    375
    #5
    Thanks Shawn!

    This is the default setup under RedHat Enterprise Linux now.

    I chose to edit /etc/php.ini instead.
     
    Will.Spencer, Aug 31, 2005 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    Yeah, you can do that too. :)
     
    digitalpoint, Sep 1, 2005 IP
  7. dilli

    dilli Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hi Shawn,
    Thanks, this code suppresses the error report. But still the data is going to the database whenever I open the page. What I want is to have the form on a page and when I submit the data, I should remain on the same page. I don't need another page (like thanks page etc).

    Below is my form-

    ****

    <body>
    <?php

    $con = mysql_connect("localhost","root","");
    if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }

    mysql_select_db("club_db", $con);

    mysql_query("INSERT INTO `club_db`.`club_master` (
    `cb_no` ,
    `cb_name` ,
    `chrtered_on`
    )
    VALUES('$_POST[cb_no]','$_POST[cb_name]','$_POST[chrtered_on]')");
    ?>


    <div class="cont">
    <div><img src="images/top.jpg" width="970" /></div>
    <div id="nav">
    <?php include("nav.php"); ?>
    </div>
    <div align="center">
    <fieldset style="width:300px;">
    <legend style="margin-top:30px; color:#7A7A7A;"><h4 style="margin-bottom:1px;">Club Master</h4></legend>
    <form action="" method="post" name="club_master" id="club_master">
    <table width="270" border="0">
    <tr>
    <td align="left">Club No:</td>
    <td><input type="text" name="cb_no" id="cb_no" tabindex="1" /></td>
    </tr>
    <tr>
    <td align="left">Club Name: </td>
    <td><input type="text" name="cb_name" id="cb_name" tabindex="2" /></td>
    </tr>
    <tr>
    <td align="left">Chartered On:</td>
    <td><input type="text" name="chrtered_on" id="chrtered_on" tabindex="3" /></td>
    </tr>
    <tr>
    <td colspan="2" align="center"><input name="Submit" type="submit" id="Submit" tabindex="4" onClick="MM_validateForm('cb_no','','R','cb_name','','R');return document.MM_returnValue" value="Submit" /></td>
    </tr>
    </table>
    <?php mysql_close($con) ?>
    </form>
     
    dilli, Oct 14, 2010 IP