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>
Link to comment
Share on other sites

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>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.