Joseph,
Thanks for the reply.

My ISP has a MS IIS server.

I am testing the following script on Apache Server / MS Win 98 / IE 5.5 and
it works fine.

When I publish the script to their server and try the formpage, I get:

"inetpub...Undefined index 1...
"inetpub...Undefinded index 2...
"inetpub...Undefined index 3...

Please advise the best way to access this script on their server.

I'm a newbie.
Thank you for your time.
TR
.......................................


<html>
<head>
<style>
body {background-color:beige;


body
{


scrollbar-base-color: #FCF6DC;
scrollbar-face-color: #E3DBB5;
scrollbar-track-color: #FCF6DC;
scrollbar-arrow-color: #000;
scrollbar-highlight-color: #fff;
scrollbar-3dlight-color: #7B6D29;
scrollbar-shadow-color: #7B6D29;
scrollbar-darkshadow-color: #E3DBB5;
}




border:5px solid black;
}
textarea {border:1pt solid red;
          background-color:white;
          color:black;

          }

textarea p{font-size:12px;

          }

table {border:1pt solid black;
       width:700px;
       font-size:10px;
       background-color:#E3DBB5;
       color:#7B6D29;
       }


input {border:1pt solid solid red;
       background-color:white;
       color:black;}

.submit {
       background-color:#800000;
       color:white;}

p {font-family:arial;
   font-size:12px;
  }

hr { color:#800000;

}

A:link:{text-decoration:none; color:#7B6D29;}
A:visited:{text-decoration:none; color:#7B6D29;}
A:hover:{text-decoration:underline; color:green}


</style>
</head>
<body>
<?
function WriteToFile ($thecomments,$thename,$theemail)
{
 $TheFile = "data.txt";
 $Open = fopen ($TheFile, "a+");
  if ($Open)
   {
    fwrite ($Open, "$thecomments\t$thename\t$theemail\n");
    fclose ($Open);
    $Worked = TRUE;
   }
 else
  {
   $Worked = FALSE;
   }
 return $Worked;
}
function ReadTheFile()
 {
  $TheFile="data.txt";
  $Open=fopen($TheFile,"r");
   if ($Open)
    {

     print("<hr>");

     print("<P><i>Some of the messages have been:</i>\n");

     $Data=file($TheFile);
      for($n=0; $n<count($Data); $n++)
       {
        $getline=explode("\t",$Data[$n]);
        print("<table>");
        print("<tr>");
        print("<TD><P>$getline[0]</TD>\n");
        print("</tr>");
        print("<tr>");
        print("<TD><P>$getline[1]</TD>\n");
        print("</tr>");
        print("<tr>");
        print("<TD><P><a
href=\"mailto:$getline[2]\";>$getline[2]</a></TD>\n");
        print("</tr>");
        print("</table>");

      } //end for loop
     fclose($Open);

   } //end if
else
 {
  print("Unable to read data.txt");
 }
} //end function

function createform()
{

print("<form action=\"$PHP_SELF\" method=post>\n");
print("<P>So...How did <b><u>you</u></b> like EagleFest 2003?:<BR> <textarea
name=\"comments\" rows=3 cols=85></textarea> <br><br>\n");
print("Your name:&nbsp<input type=text name=\"yourname\" size=30>\n");
print("Your e-mail:&nbsp<input type=text name=\"youremail\" size=30>\n");
print("<input type=hidden name=\"beensubmitted\" value=\"TRUE\">\n");
print("<input type=submit name=\"submit\" <span class=\"submit\"
value=\"click to submit\"></span>\n");
print("</form>\n");

}

function handleform()
{
 global $comments;
 global $yourname;
 global $youremail;
 $comments=stripslashes($comments);
 $yourname=stripslashes($yourname);
 $youremail=stripslashes($youremail);
 $callfunction=WriteToFile($comments,$yourname,$youremail);
  if($callfunction)
   {

    print("<p align=\"center\">&nbsp;</p>");
    print("<p align=\"center\">&nbsp;</p>");
    print("<p align=\"center\">&nbsp;</p>");
    print("<p align=\"center\">&nbsp;</p>");
    print("<p align=\"center\">&nbsp;</p>");
    print("<P align=\"center\"><font size=3 color=\"#800000\"><B>Thank you
for your comments about EagleFest 2003.</text></B></font></P>");

   }//end if
  else
  {
   print("Your submission was not processed.");
  } //end else
}

if($beensubmitted)
 {
  handleform();
 }
else
{
createform();
ReadTheFile();
}
?>
</body>
</html>





-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to