Menu

Undefined variable: error in X

Help
garry egan
2003-02-02
2003-02-02
  • garry egan

    garry egan - 2003-02-02

    First, let me THANK YOU for developing such an awesome program.  I cannot tell you how cool it is.  The program you wrote is so easy to use and I can practically build an entire business-quality data center around it and have it web accessible.  When I tell clients what I can do for them, they think its going to cost tens of thousands of dollars.  If I can get this up and running, Ill be a happy boy!  So here we go:

    After completing step 1, number of fields, I immediately get this error on Step 2 "Notice: Undefined variable: error in d:\inetpub\wwwroot\<servername>\phpdev\phpform\fields.php on line 173".  I checked line 173 and it refers to "$errors=0;"  So, I ignore that error and go on.  Then I get these errors on Step 4, "Notice: Undefined variable: active in d:\inetpub\wwwroot\<servername>\phpdev\phpform\process2.php on line 179

    Notice: Undefined variable: active in d:\inetpub\wwwroot\<servername>\phpdev\phpform\process2.php on line 179

    Notice: Undefined variable: active in d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\process2.php on line 232

    Notice: Undefined variable: active in d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\process2.php on line 233

    Notice: Undefined variable: active in d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\process2.php on line 232

    Notice: Undefined variable: active in d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\process2.php on line 233

    Step 5 produced this error, "Notice: Undefined variable: create_dat in d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\process3.php on line 544"

    Then after the form is generated and I enter in data, I get these errors : "Notice: Undefined index: HTTPS in d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\forms\process.php on line 13

    Warning: Failed to Connect in d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\forms\process.php on line 17

    Warning: Cannot add header information - headers already sent by (output started at d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\forms\process.php:13) in d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\forms\process.php on line 22"

    I am using phpformgen v2.04, Apache/1.3.24, PHP/4.2.2, my sql 3.23.39  (http://www.xdrop.com/phpinfo.php).

    Musawir, I know there is a lot here.  Hopefully, you  can sort this out.  Am I using bad version of PHP or Apache?  My SQL?  ANY help, or instructions would be appreciated.  I will even consider wiping everything out and using your suggested configuration to make this work,

    Thanks
    Garry

     
    • garry egan

      garry egan - 2003-02-02

      UPDATE:  One error was created due to not having the SMTP server set in PHP.INI.(I am using Windows platform)/ Apache to serve this up.)  Once I set ip, the error on Line 17 went away.

      G

       
    • garry egan

      garry egan - 2003-02-02

      Now its pretty much down to two errors:

      Notice: Undefined index: HTTPS in d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\forms\process.php on line 14

      Warning: Cannot add header information - headers already sent by (output started at d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\forms\process.php:14) in d:\inetpub\wwwroot\www.communicationstrader.com\phpdev\phpform\forms\process.php on line 24

      Here is the process.php created:

      <?php
      include("global.inc.php");
      $errors=0;
      $error="The following errors occured while processing your form input.<ul>";
      pt_register('POST','One');
      pt_register('POST','Two');
      pt_register('POST','Three');
      if($One=="" || $Two=="" || $Three=="" ){
      $errors=1;
      $error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
      }
      if($errors==1) echo $error;
      else{
      $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
      $message="One: ".$One."
      Two: ".$Two."
      Three: ".$Three."
      ";
      mail("garryegan@hotmail.com","Form Submitted at your website",$message,"From: phpFormGenerator");
      $link = mysql_connect("localhost","user","");
      mysql_select_db("inventory",$link);
      $query="insert into testtable407 (Name,Address,Phone) values ('".$One."','".$Two."','".$Three."')";
      mysql_query($query);
      header("Refresh: 0;url=http://www.communicationstrader.com/");
      }
      ?>

       
    • Musawir Ali

      Musawir Ali - 2003-02-02

      just delete the line 14

       
    • garry egan

      garry egan - 2003-02-02

      In which file?  The process.php that is dynamically created when a new form is created?  If so, do I have to delete this line every time I create a new form?  Where is this line generated from, i.e. which file created this Line 14 so I can prevent future forms creating this line,  Thanks,

      Garry

       
    • Musawir Ali

      Musawir Ali - 2003-02-02

      yea, in process.php . You shouldn't be deleting this at all, since its there for a reason. It works, but I'm not sure whats going wrong in your case. Perhaps you're running an older version of PHP which doesn't not support these evoirenmental variables.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.