Problems with PHP3 script - Missing Post reply data
| From: | Mike Gifford | Date: | Thu, 29 Jun 2000 17:39:01 +0000 |
| Subject: | Problems with PHP3 script - Missing Post reply data | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-3843@lists.php.net to get a copy of this message | ||
Hello,
I've got a simple html form which is posted to a php3 file. The PHP
file is processing it and it looks to be mostly correct. However, when
I view the source of the page to trouble shoot it, I don't get the page
source, but rather I get the following:
<TITLE>Missing Post reply data</TITLE>
<H1>Data Missing</H1>
This document resulted from a POST operation and has expired from the
cache. If you wish you can repost the form data to recreate the
document by pressing the <b>reload</b> button.
How on earth is it that the page looks completely different from the
source? Where on earth am I going wrong.
I've included both the html form and the php3 script.
THE FORM:
<form method="POST" action="remove.php3">
Card Number: <input type="text" size="5" name="viewcard">
<input TYPE="SUBMIT" VALUE="View Card!"></form>
THE SCRIPT:
<?php
$cardfile="cardfile.txt";
$dataarray=file("$cardfile");
$filearray = file("$cardfile");
$httpcounter=0;
$tok = strtok($dataarray[$viewcard-1],":");
while($tok){
$httpcounter++;
if ($httpcounter == 1) {
echo "";
} elseif($httpcounter == 2){
echo "<table><tr><td><IMG STYLE=\"$tok\"></td>
";
} elseif ($httpcounter == 4) {
echo "<td><table><tr><td> TheMessage: $tok </td>";
} elseif ($httpcounter == 5) {
echo "<td> Sender: $tok </td>";
} elseif ($httpcounter == 6) {
echo "<td> SEmail: $tok </td>";
} elseif ($httpcounter == 7) {
echo "<td> Reciever: $tok </td>";
} else {
echo "<td> REmail: $tok
</td></tr></table></td></tr></table>";
}
$tok = strtok(":");
}
?>
Thanks.
Mike
--
Mike A. Gifford OpenConcept Consulting
Mike@OpenConcept.On.Ca Http://www.OpenConcept.On.Ca
Web Design, Hosting, Graphic Design & Site Promotion
Featured Site --> Http://WTOAction.Org