Re: Problems with PHP3 script - Missing Post reply data

From: Date: Thu, 29 Jun 2000 21:05:17 +0000
Subject: Re: Problems with PHP3 script - Missing Post reply data
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3874@lists.php.net to get a copy of this message
Hi Mike, Mike Gifford wrote: > > 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. You mean your actually getting an html page rendered when you hit the submit button? (cont'd) > 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. Check how your browsers cache is set up? You know, this brings something up. I've read that (I guess) by default) (at least) Apache sends the result request to the browser in such a fashion that dynamically generated pages won't be cached. You have to do some magic with expires module or some such. Or does PHP handle this? >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 below FORM and SCRIPT are embedded in proper html elements? > 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"); Just curious: Why 2 arrays of some thing? Apparently not using $filearray. > $httpcounter=0; > $tok = strtok($dataarray[$viewcard-1],":"); Oh, should of mentioned "Tain't a guru". But, $viewcard coming in as a number that is a string? Don't know, just that the input type is text. Well, if a single digit, type casting not a problem. But you might want to do some validation here or just force a type cast to int. Or maybe not. > 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 { counter hits 3, falls thru to here. Isn't this screwing your table up? > echo "<td> REmail: $tok > </td></tr></table></td></tr></table>"; > } > $tok = strtok(":"); > > } > ?> > > Thanks. Will reserve that to someone who can actually help. Saaaalute!!! Mike D. > > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#3874) next »