|
Posted by dave.degroot on 05/11/07 14:23
On May 11, 10:19 am, ZeldorBlat <zeldorb...@gmail.com> wrote:
> On May 11, 10:16 am, dave.degr...@gmail.com wrote:
>
>
>
>
>
> > On May 11, 10:13 am, ZeldorBlat <zeldorb...@gmail.com> wrote:
>
> > > On May 11, 10:08 am, dave.degr...@gmail.com wrote:
>
> > > > What does this mean?
>
> > > > [client 134.205.2.139] PHP Parse error: parse error, unexpected
> > > > T_CONSTANT_ENC\
> > > > APSED_STRING in /home/web/david/processedorder.php on line 23,
> > > > referer: http://\
> > > > degroot.xidus.net/
>
> > > What's on line 23 (and the lines around it)? Probably has something
> > > to do with your quotes.
>
> > Zedor thanks for the quick response... Line 23 is the 'Customer
> > address" line:
>
> > $toaddress = 'dave.degr...@gmail.com';
> > $subject = 'autoparts order';
> > $mailcontent = 'Customer name: '.$name." \n"
> > 'Customer address: '.$address." \n"
> > 'Thermostats Ordered: '.$thermostqty2." \n"
> > 'Sparkplugs Ordered: '.$spkplgqnt." \n"
> > 'Tyers Ordered: '.$tireqnt." \n"
> > $fromaddress = 'From: nore...@degroot.xidus.net';
> > mail($toaddress, $subject, $mailcontent, $fromaddress);
>
> You're missing a semi-colon after your "Tyers Ordered" line.- Hide quoted text -
>
> - Show quoted text -
Hmm, I've just changed this and it still doesn't work the way that I
would like...
see http://degroot.xidus.net
<?php
//create short variable names
$tireqnt = $_POST['tireqnt'];
$spkplgqnt = $_POST['spkplgqnt'];
$thermostqty2 = $_POST['thermostqty2'];
$address = $_POST['address'];
$name = $_POST['name'];
$toaddress = 'dave.degroot@gmail.com';
$subject = 'autoparts order';
$mailcontent = 'Customer name: '.$name." \n"
'Customer address: '.$address." \n"
'Thermostats Ordered: '.$thermostqty2." \n"
'Sparkplugs Ordered: '.$spkplgqnt." \n"
'Tyers Ordered: '.$tireqnt." \n";
$fromaddress = 'From: noreply@degroot.xidus.net';
mail($toaddress, $subject, $mailcontent, $fromaddress);
echo '<p>Order processed at ';
echo date('H:i, jS F');
echo' Pacific standard Time</p>';
echo'<p>Your order is as follows: </p>';
echo $tireqnt. ' tires<br />';
echo $thermostqty2. ' thermostats<br />';
echo $spkplgqnt. ' spark plugs<br />';
$totalqty = 0;
$totalqty = $tireqnt + thermostqty2 + $spkplgqnt;
echo 'Items ordered: '.$totalqty.'<br />';
$totalamount = 0.00;
define('TIREPRICE', 100);
define('THERMOSTAT', 10);
define('SPARKPRICE', 4);
$totalamount = $tireqnt * TIREPRICE
+ $thermostqty2 * THERMOSTAT
+ $spkplgqnt * SPARKPRICE;
echo 'Subtotal: $'.number_format($totalamount,2).'<br />';
$taxrate = .10; // local sales tax is 10%;
$totalamount = $totalamount * (1 + $taxrate);
echo 'Total including tax: $'.number_format($totalamount,2).'<br />';
if( $totalqty == 0 )
echo 'You did not order anything on the previous page!<br />';
?>
Navigation:
[Reply to this message]
|