Unexpected T_string

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • bmorrow
    Master Sergeant

    • Oct 2006
    • 62

    Unexpected T_string

    Anyone know what this means?
    I find it when I publish the action.php page after I've copied the code into the HTML.

    Bob
  • Watdaflip
    Major General

    • Sep 2005
    • 2116

    #2
    Re: Unexpected T_string

    Post the code for action.php, you probably have some text that isn't enclosed in a " " or ' ', or something like

    echo "blah blah " blah " blah "; where the third blah isn't enclosed in quotes.

    If I see the code I can fix the error

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

    Comment

    • bmorrow
      Master Sergeant

      • Oct 2006
      • 62

      #3
      Re: Unexpected T_string

      Thanks. I'm trying other things and am getting confused but I'll go back to step one and check everything.

      Comment

      • bmorrow
        Master Sergeant

        • Oct 2006
        • 62

        #4
        Re: Unexpected T_string

        Here's the code I'm using on my test page which only has one field and the submit button. The page is: https://www.hamiltonhomereview.com/h...nterstest.html


        <?PHP
        $mailto = "bmorrow@execs.com";
        $email = $HTTP_POST_VARS['email'];
        if ($email == "") {
        $email = $mailto;
        }
        $mailsubj = "Jointheclub";
        $mailhead = "From: $email\n";
        reset ($HTTP_POST_VARS);
        $mailbody = "name","Button1":\n";
        while (list ($key, $val) = each ($HTTP_POST_VARS))
        {
        if ($key!="submit")
        {
        $mailbody .= "$key : $val\n";
        }
        }
        mail($mailto, $mailsubj, $mailbody, $mailhead);
        ?>

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: Unexpected T_string

          Originally posted by bmorrow View Post
          Here's the code I'm using on my test page which only has one field and the submit button. The page is: www.hamiltonhomereview.com/househunterstest.html


          <?PHP
          $mailto = "bmorrow@execs.com";
          $email = $HTTP_POST_VARS['email'];
          if ($email == "") {
          $email = $mailto;
          }
          $mailsubj = "Jointheclub";
          $mailhead = "From: $email\n";
          reset ($HTTP_POST_VARS);
          $mailbody = "name","Button1":\n";
          while (list ($key, $val) = each ($HTTP_POST_VARS))
          {
          if ($key!="submit")
          {
          $mailbody .= "$key : $val\n";
          }
          }
          mail($mailto, $mailsubj, $mailbody, $mailhead);
          ?>
          The line in red is wrong, should be something like

          $mailbody = "Info submitted from our web form : \n";

          Why did you place "name" and "Button1" in there ?
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • bmorrow
            Master Sergeant

            • Oct 2006
            • 62

            #6
            Re: Unexpected T_string

            I thought you were supposed to name the fields. I guess not.

            Comment

            • Watdaflip
              Major General

              • Sep 2005
              • 2116

              #7
              Re: Unexpected T_string

              If you want to use submitted data you need to do 2 things

              1) create a variabled

              $name

              2) retrieve the posted data from the form

              $name = $_POST['name'];

              Register/Login Script
              Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

              Comment

              • bmorrow
                Master Sergeant

                • Oct 2006
                • 62

                #8
                Re: Unexpected T_string

                Thank you so much for your help Watdaflip and naval design. The form works great, the most complicated page I've done yet. Should boost my prospect marketing targets immensely.
                One other question that's not related. When I relaunch my site, I won't need some of the old published pages. How do I erase them off the web?

                Comment

                • Andy128
                  Major General

                  • Dec 2005
                  • 2317

                  #9
                  Re: Unexpected T_string

                  Use the FTP Manager. This will bring up a window of files on your computer on the left and on the right -will be the files on your server. Delete those that you desire off the server. !!Once you delete them from the server- they are gone....gone...gone...- so make sure they are the ones you want deleted.

                  Andy
                  PHP- is a blast!

                  Comment

                  • bmorrow
                    Master Sergeant

                    • Oct 2006
                    • 62

                    #10
                    Re: Unexpected T_string

                    Thanks Andy, that's awesome! It's so simple when you've got help.

                    Comment

                    • Andy128
                      Major General

                      • Dec 2005
                      • 2317

                      #11
                      Re: Unexpected T_string

                      You are very welcome.

                      Andy
                      PHP- is a blast!

                      Comment

                      • bmorrow
                        Master Sergeant

                        • Oct 2006
                        • 62

                        #12
                        Re: Unexpected T_string

                        Okay, went too fast. I got into FTP Manager through the Cpanel but have no clue what to do then. How do I log in to get to the columns you speak of?

                        Comment

                        • Andy128
                          Major General

                          • Dec 2005
                          • 2317

                          #13
                          Re: Unexpected T_string

                          Not through cpanel. Open the BV web builder program and then click on Tools and then FTP Manager ( I believe as I am not at my computer) Then click on connect on the left side under the Menu Bar. This will allows you to move or FTP files, pages, photos, folders from computer to server and vice versa. You can also use it to delete files, folders, photos,etc.... Simply right click on the file, folder, webpage and then choose delete.

                          Andy
                          PHP- is a blast!

                          Comment

                          • bmorrow
                            Master Sergeant

                            • Oct 2006
                            • 62

                            #14
                            Re: Unexpected T_string

                            Okay, now I feel really stupid. WHen I open up Blue Voda, I don't see Tools anywhere. I see Toolbar and all the tools used to work on a page, but no FTP Manager.

                            Comment

                            • navaldesign
                              General & Forum Moderator

                              • Oct 2005
                              • 12080

                              #15
                              Re: Unexpected T_string

                              Do you have the top Text toolbar ? The one saying File Edit View Insert Format ....... Tools Window Help ? If not, right click on any part of the top bar and when the menu opens, check the "Menubar" checkbox.
                              Navaldesign
                              Logger Lite: Low Cost, Customizable, multifeatured Login script
                              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                              Comment

                              Working...
                              X