Parsing error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dave.degroot@gmail.com

    Parsing error

    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.n et/

  • ZeldorBlat

    #2
    Re: Parsing error

    On May 11, 10:08 am, dave.degr...@gm ail.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.n et/
    What's on line 23 (and the lines around it)? Probably has something
    to do with your quotes.

    Comment

    • dave.degroot@gmail.com

      #3
      Re: Parsing error

      On May 11, 10:13 am, ZeldorBlat <zeldorb...@gma il.comwrote:
      On May 11, 10:08 am, dave.degr...@gm ail.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.n et/
      >
      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.degroot@g mail.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);

      Comment

      • ZeldorBlat

        #4
        Re: Parsing error

        On May 11, 10:16 am, dave.degr...@gm ail.com wrote:
        On May 11, 10:13 am, ZeldorBlat <zeldorb...@gma il.comwrote:
        >
        On May 11, 10:08 am, dave.degr...@gm ail.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.n et/
        >
        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...@g mail.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.

        Comment

        • ZeldorBlat

          #5
          Re: Parsing error

          On May 11, 10:16 am, dave.degr...@gm ail.com wrote:
          On May 11, 10:13 am, ZeldorBlat <zeldorb...@gma il.comwrote:
          >
          On May 11, 10:08 am, dave.degr...@gm ail.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.n et/
          >
          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...@g mail.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";

          Comment

          • Michael Fesser

            #6
            Re: Parsing error

            ..oO(ZeldorBlat )
            >Zedor thanks for the quick response... Line 23 is the 'Customer
            >address" line:
            >>
            >$toaddress = 'dave.degr...@g mail.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($toaddres s, $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

            Comment

            • dave.degroot@gmail.com

              #7
              Re: Parsing error

              On May 11, 10:19 am, ZeldorBlat <zeldorb...@gma il.comwrote:
              On May 11, 10:16 am, dave.degr...@gm ail.com wrote:
              >
              >
              >
              >
              >
              On May 11, 10:13 am, ZeldorBlat <zeldorb...@gma il.comwrote:
              >
              On May 11, 10:08 am, dave.degr...@gm ail.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.n et/
              >
              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...@g mail.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@g mail.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.'<b r />';

              $totalamount = 0.00;

              define('TIREPRI CE', 100);
              define('THERMOS TAT', 10);
              define('SPARKPR ICE', 4);
              $totalamount = $tireqnt * TIREPRICE
              + $thermostqty2 * THERMOSTAT
              + $spkplgqnt * SPARKPRICE;

              echo 'Subtotal: $'.number_forma t($totalamount, 2).'<br />';

              $taxrate = .10; // local sales tax is 10%;
              $totalamount = $totalamount * (1 + $taxrate);
              echo 'Total including tax: $'.number_forma t($totalamount, 2).'<br />';

              if( $totalqty == 0 )
              echo 'You did not order anything on the previous page!<br />';


              ?>

              Comment

              • dave.degroot@gmail.com

                #8
                Re: Parsing error

                On May 11, 10:23 am, dave.degr...@gm ail.com wrote:
                On May 11, 10:19 am, ZeldorBlat <zeldorb...@gma il.comwrote:
                >
                >
                >
                >
                >
                On May 11, 10:16 am, dave.degr...@gm ail.com wrote:
                >
                On May 11, 10:13 am, ZeldorBlat <zeldorb...@gma il.comwrote:
                >
                On May 11, 10:08 am, dave.degr...@gm ail.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.n et/
                >
                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...@g mail.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.n et
                >
                <?php
                //create short variable names
                $tireqnt = $_POST['tireqnt'];
                $spkplgqnt = $_POST['spkplgqnt'];
                $thermostqty2 = $_POST['thermostqty2'];
                $address = $_POST['address'];
                $name = $_POST['name'];
                >
                $toaddress = 'dave.degr...@g mail.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.'<b r />';
                >
                $totalamount = 0.00;
                >
                define('TIREPRI CE', 100);
                define('THERMOS TAT', 10);
                define('SPARKPR ICE', 4);
                $totalamount = $tireqnt * TIREPRICE
                + $thermostqty2 * THERMOSTAT
                + $spkplgqnt * SPARKPRICE;
                >
                echo 'Subtotal: $'.number_forma t($totalamount, 2).'<br />';
                >
                $taxrate = .10; // local sales tax is 10%;
                $totalamount = $totalamount * (1 + $taxrate);
                echo 'Total including tax: $'.number_forma t($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...

                Comment

                • Geoff Berrow

                  #9
                  Re: Parsing error

                  Message-ID: <1178893266.280 479.8680@h2g200 0hsg.googlegrou ps.comfrom
                  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/

                  Comment

                  • dave.degroot@gmail.com

                    #10
                    Re: Parsing error

                    On May 11, 1:05 pm, Geoff Berrow <blthe...@ckdog .co.ukwrote:
                    Message-ID: <1178893266.280 479.8680@h2g200 0hsg.googlegrou ps.comfrom
                    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.

                    Comment

                    Working...