By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,350 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,350 IT Pros & Developers. It's quick & easy.

Parsing error

P: n/a
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/

May 11 '07 #1
Share this Question
Share on Google+
9 Replies


P: n/a
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.

May 11 '07 #2

P: n/a
On May 11, 10:13 am, ZeldorBlat <zeldorb...@gmail.comwrote:
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 = 'd***********@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: no*****@degroot.xidus.net';
mail($toaddress, $subject, $mailcontent, $fromaddress);

May 11 '07 #3

P: n/a
On May 11, 10:16 am, dave.degr...@gmail.com wrote:
On May 11, 10:13 am, ZeldorBlat <zeldorb...@gmail.comwrote:
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.

May 11 '07 #4

P: n/a
On May 11, 10:16 am, dave.degr...@gmail.com wrote:
On May 11, 10:13 am, ZeldorBlat <zeldorb...@gmail.comwrote:
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);
Actually, I spoke too soon. You are missing a semi-colon after your
"Tyers Ordered" line, but you also need some more concatenation
operators (after each of your \n's). So something like this:

$mailcontent = 'Customer name: '.$name." \n" .
'Customer address: '.$address." \n" .
'Thermostats Ordered: '.
$thermostqty2." \n" .
'Sparkplugs Ordered: '.$spkplgqnt."
\n" .
'Tyers Ordered: '.$tireqnt." \n";

May 11 '07 #5

P: n/a
..oO(ZeldorBlat)
>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.
Additionally the strings are not concatenated, that's why PHP complains
about line 23.

Micha
May 11 '07 #6

P: n/a
On May 11, 10:19 am, ZeldorBlat <zeldorb...@gmail.comwrote:
On May 11, 10:16 am, dave.degr...@gmail.com wrote:


On May 11, 10:13 am, ZeldorBlat <zeldorb...@gmail.comwrote:
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 = 'd***********@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: no*****@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 />';
?>

May 11 '07 #7

P: n/a
On May 11, 10:23 am, dave.degr...@gmail.com wrote:
On May 11, 10:19 am, ZeldorBlat <zeldorb...@gmail.comwrote:


On May 11, 10:16 am, dave.degr...@gmail.com wrote:
On May 11, 10:13 am, ZeldorBlat <zeldorb...@gmail.comwrote:
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...

seehttp://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.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);

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 />';

?>- Hide quoted text -

- Show quoted text -
What is concatenation? How does one go about this?

Sorry, extreme newbie...

May 11 '07 #8

P: n/a
Message-ID: <11********************@h2g2000hsg.googlegroups.co mfrom
ZeldorBlat contained the following:
$mailcontent = 'Customer name: '.$name." \n" .
'Customer address: '.$address." \n" .
'Thermostats Ordered: '.
$thermostqty2." \n" .
'Sparkplugs Ordered: '.$spkplgqnt."
\n" .
'Tyers Ordered: '.$tireqnt." \n";
I know that's seen by some as the correct way to do it, but all that
concatenation is a right pain.

I much prefer this

$mailcontent = "Customer name: $name
Customer address: $address
Thermostats Ordered: $thermostqty2
Sparkplugs Ordered: $spkplgqnt
Tyers Ordered: $tireqnt\n";

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
May 11 '07 #9

P: n/a
On May 11, 1:05 pm, Geoff Berrow <blthe...@ckdog.co.ukwrote:
Message-ID: <11********************@h2g2000hsg.googlegroups.co mfrom
ZeldorBlat contained the following:
$mailcontent = 'Customer name: '.$name." \n" .
'Customer address: '.$address." \n" .
'Thermostats Ordered: '.
$thermostqty2." \n" .
'Sparkplugs Ordered: '.$spkplgqnt."
\n" .
'Tyers Ordered: '.$tireqnt." \n";

I know that's seen by some as the correct way to do it, but all that
concatenation is a right pain.

I much prefer this

$mailcontent = "Customer name: $name
Customer address: $address
Thermostats Ordered: $thermostqty2
Sparkplugs Ordered: $spkplgqnt
Tyers Ordered: $tireqnt\n";

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDshttp://www.ckdog.co.uk/rfdmaker/
Thanks man, that works like a charm.

d.

May 11 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.