PHP beginner propblems

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PHP beginner propblems

Postby gdavies6 » 15. July 2011 17:40

Hi All

I'm new here and slowly, I mean slowly getting into PHP. The biggest issue I have is in configuring php to run on my computer. Anyway i managed to get xampp installed yesterday and it appears to get working.

I'm writing some very basic scripts at the moment. The problem I have is that every time a call the php file processorer.php, Firefox and ie open new tabs continually. I believe this to be a config issue. Has anyone experienced this behaviour before? If so how do you get around it?

Scripts I am using -

html calling script

Code: Select all

<html>

<head>
   <title>Bob's Auto Parts</title>
</head>

<body>


<form action="processorder.php" method="post">

   <table border="0">

      <tr bgcolor="#cccccc">
         <td width="150" align="center">Item</td>
         <td width="150" align="center">Quantity</td>
      </tr>
      <tr>
         <td>Tires</td>
         <td align="center"><input type="text" name="tireqty" size ="3" maxlength="3"/></td>
      </tr>
      <tr>
         <td>Oil</td>
         <td align="center"><input type="text" name="oilqty" size ="3" maxlength="3"/></td>
      </tr>
      <tr>
         <td>Spark Plugs</td>
         <td align="center"><input type="text" name="sparkqty" size ="3" maxlength="3"/></td>
      </tr>
      <tr>
         <td colspan="2" align="center"><input type="Submit" value="Submit Order"/></td>
      </tr>
   </table>
</form>

</body>


</html>

Processorder.php file


Code: Select all

<html>

<head>
   
   <title>Bob's Auto Parts - Order Results</title>
</head>
   
   


<body>


<h1>Bob's Auto Parts</h1>

<h2>Order Results</h2>

<?php
   echo '<p>Order processed.</p>';
?>

</body>


</html>


Thanks is advance for your replies!!!
gdavies6
 
Posts: 1
Joined: 15. July 2011 17:35

Re: PHP beginner propblems

Postby Sharley » 16. July 2011 08:45

Perhaps it is a browser setting as I tried your code in the following browsers with no issues at all (the form when submitted opened the php response in the same tab):
SeaMonkey
Firefox (various versions)
IE
Iron
Opera (various versions)
Pale Moon (various versions)

BTW, the processorder.php file name in your html file code should be the same text case as the actual file name in the folder, although I did notice that in your case it did not make any difference one way or the other and so had no bearing on your issue.

Look in your browser's settings for tab behavior in particular the opening of new tabs next to the calling tab etc. and experiment with various settings - but remember to clear your browser's cached files from time to time to eliminate an older file being presented as this often happens at localhost development level.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 126 guests