Jump to content

Use of undefined constant php - assumed 'php' in C:\stuff4free\test\buy.php on l


madspof

Recommended Posts

can anyone help me with this script i dont even know if it is the script it could be the php.ini file anyway heres the script it keeps throwing up this error message Use of undefined constant php - assumed 'php' in C:\stuff4free\test\buy.php on l

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php
if (!isset($shipping))
$shipping = "economy";

echo "Your order will be sent via $shipping shipping";
?>


<FORM ACTION="buy.php" METHOD=POST></FORM>

<INPUT TYPE="RADIO" NAME="shipping" VALUE="economy";
<?php if ($shipping.php ==  "economy") echo "CHECKED";?>> Economy

<INPUT TYPE="RADIO" NAME="shipping" VALUE="standard";
<?php if ($shipping.php ==  "standard") echo "CHECKED";?>> Standard

<INPUT TYPE="RADIO" NAME="shipping" VALUE="express";
<?php if ($shipping.php ==  "express") echo "CHECKED";?>> Express
<INPUT TYPE="SUBMIT" VALUE="Change shipping option">
</FORM>
</body>
</html>
okay thnks tht wrked but for some reason the script will nt change once the change order had been clicked this is the code i have now
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php
if (!isset($shipping))
$shipping = "economy";

echo "Your order will be sent via $shipping shipping";
?>


<FORM ACTION="buy.php" METHOD=POST></FORM>

<p>
  <INPUT TYPE="RADIO" NAME="shipping" VALUE="economy";
<?php if ($shipping ==  "economy") echo "CHECKED";?>>
  Economy

  <INPUT TYPE="RADIO" NAME="shipping" VALUE="standard";
<?php if ($shipping ==  "standard") echo "CHECKED";?>>
  Standard

  <INPUT TYPE="RADIO" NAME="shipping" VALUE="express";
<?php if ($shipping ==  "express") echo "CHECKED";?>>
Express</p>
<p>  <INPUT TYPE="SUBMIT" VALUE="Change shipping option">
  </FORM>
</p>
</body>
</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.