Fwd: Re: Problems running PHP.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Note: forwarded message attached.



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 
--- Begin Message ---
Hi Jose,

Since your report is not about the php.net website, this is not the right address to send it. Please consult php-general@xxxxxxxxxxxxx for support questions.

Regards,
Gabor Hojtsy

Jose Arguello írta:
I just install in my computer PHP 5.0.2, I followed
the instruction on the book PHP and MySql Web
Development by Luke Welling and Laura Thomson.
But, it is not working. I have tried to use this
codes, one is just a html form and the other is a php
code. I tried to pass the values from the form to the
php code but it is not getting the values.

HTML Form:

<form action="proccessorder.php" method="GET">
<table border="0">
<tr bgcolor="#cccccc">
         <td width="150">Item</td>
         <td width="15">Quantity</td>
</tr>
<tr>
         <td>Tires</td>
         <td align="center"><input type="text"
name="tireqty" size="3"
		maxlenght="3" /></td>
</tr>
<tr>
         <td>Oil</td>
         <td aling="center"><div align="center">
          <input type="text" name="oilqty" size="3"
		maxlenght="3" />
        </div></td>
</tr>
<tr>
         <td>Spark Plugs</td>
         <td aling="center"><div align="center">
          <input type="text" name="sparkqty" size="3"
		maxlenght="3" />
        </div></td>
</tr>
<tr>
         <td colspan="2" align="center"><input
type="submit" value="Submit Order" /></td>
</tr>
</table>
</form>

Php Code:

<?php
	// variables para capturar desde la orderform
	$tireqty = $HTTP_GET_VARS['tireqty'];
	$oilqty = $HTTP_GET_VARS['oilqty'];
	$sparkqty = $HTTP_GET_VARS['sparkqty'];
?>

<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 pordessed at ';
		echo date('H:i, jS F');
		echo '</p>';
		
		echo '<p>Your order is as follows: </p>';
		echo $tireqty.' tires<br />';
		echo $oilqty.' bottles of oil<br />';
		echo $sparkqty.' spark plugs<br />';
     ?>
   </body>
</html>


I am sure that this code works because I tried it on a server who is running php 4.0, I know that in php 5.0.2, I can use $_POST and $_GET instead of $HTTP_GET_VARS or $HTTP_POST_VARS. But, I have tried them and they are not working. So, I hope you can help me to fix it, because I really want to learn how to program with PHP.

Best Regards,
                 Jose



__________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com





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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux