Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POST unreliable

Status
Not open for further replies.

dmg2206

MIS
Feb 15, 2002
54
US
It seems that POSTing information from a form to another page only works intermittently. Sometimes it works and sometimes it doesn't. Here's some example code:

The intake page (posttest.ccs1):
Code:
<html>
  <head>
    <title>Test of POST</title>
  </head>
  <body bgcolor='#000088'><form action='posttest_results.ccs1' method='POST'>
   <center><table bgcolor=white border=1>
    <tr>
     <td><b>Variable #1:</b></td>
     <td><input type=text name='var1'></td>
    </tr>
    <tr>
     <td><b>Variable #2:</b></td>
     <td><input type=text name='var2'></td>
    </tr>
    <tr>
     <td><b>Variable #3:</b></td>
     <td><input type=text name='var3'></td>
    </tr>
    <tr>
     <td colspan=2 align=middle><input type=submit></td>
    </tr>
   </table></center></form>
  </body>
</html>

The next page (posttest_results.ccs1):
Code:
<html>
  <head>
    <title></title>
  </head>
  <body>
   <b>Variable #1:  </b><?php echo $_POST['var1']; ?><br>
   <b>Variable #2:  </b><?php echo $_POST['var2']; ?><br>
   <b>Variable #3:  </b><?php echo $_POST['var3']; ?>
  </body>
</html>

Sometimes the values I entered show up, and sometimes they don't. Any clue?
 
Question:
What is ccs1?
What is the web server software?
PHP release?
 
The webserver is Apache (version 1.3.20).

In httpd.conf I've set up Apache to parse files with the extension &quot;ccs1&quot; (not &quot;css1&quot;) with PHP. Essntially, on this system .ccs1 files are the same as .php files.

PHP version is 4.1.1.
 
I'm testing it several ways. I'll come in fresh, entering in the data and then hitting submit. Or I'll refresh the results page. Or I'll enter the information and hit submit, then hit the back button, then hit submit again.

It appears that the first attempt usually fails, but subsequent attempts succeed. It's almost as if I need to wake it up first before I can POST. Weird.
 
I'm using IE 6. Never had problems with IE 6 and the website until just recently.

I just checked on NeoPlanet. That seems to work.
 
isn't it necessary to begin a php page with <?
even when you want to start with html ??

<? ?>
<html>
<head>
<title></title>
</head>
<body>
<b>Variable #1: </b><?php echo $_POST['var1']; ?><br>
<b>Variable #2: </b><?php echo $_POST['var2']; ?><br>
<b>Variable #3: </b><?php echo $_POST['var3']; ?>
</body>
</html>
<? ?>

?????
 
and have you tested it with the .php extension for you're filename ??
 
You can use inline <?php...?> tags. Everything outside the tags gets streamed to the browser as raw output.

I don't recommend the practice. It gets hairy trying to keep track of program flow with complex programs when you have to keep track of whether PHP is in output or interpreted mode.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
OK, I think I've found the problem. The latest update of IE 6 for Windows 98 (I'm unsure of the number) apparently is a bit buggy in handling POSTing of data. I removed the update through &quot;Add/Remove Programs&quot;, and it seems to be working fine. Better yet, I get to blame Microsoft. :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top