Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Php... Help Please

  1. #11
    Join Date
    May 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    When I tried the echo statement it threw this error and wouldn't even open the page,

    Parse error: parse error, unexpected T_ECHO in D:\Inetpub\wwwroot\nt04\jamestranstech.com\register1.php on line 156
    Also, if you will take a second and help scan over the beginning of the code, isn't the header before anything that outputs html?

    Like I said, I'm new, so thanks for bearing with me.

  2. #12
    Join Date
    May 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The book I'm ready said to move the entire Isset () conditional to the very top of the page above the if (isset($_POST['submit'])) and I did that and now it only directs me to thankyou.php when I am at the page.

    To see what I'm talking about go to www.jamestranstech.com/register1.php


  3. #13
    Join Date
    May 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    can anyone help me??

  4. #14
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Hmm, djr33 is right about the headers. What's puzzling me is I don't see anything actually being echoed before that?

    And...that isn't good. The solution for the redirection at the right time is to move the actual script to a different page and have the form submit to that different page. Make sense?

    The other thing I was wondering, even though a bit off topic, is how secure you're making this? Any encryption/secure server? People aren't going to want to send their credit card info online if there's no security, and for good reason.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  5. #15
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Looks like there isn't actually anything echoed first. I was looking at the small bit of code you posted last, which seemed to imply there may have been html before that. Looking back over all of it, I don't see any conflicts there.

    However, this is still worth considering in that you have a confirmation message "...confirmation email sent to [email]." but it doesn't ever get displayed if you just redirect with a location header after that.


    The unexpected T_ECHO is an error basically meaning that something in the syntax is off. It could be a missing semicolon (likely), open brackets/parentheses, two lines run together, etc.
    Take a close look at that line and the one before it and the one after it. If you can't find the error, post those three lines. (Very likely it's right around the problem area, so we probably don't need the whole script.)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #16
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Cannot modify header information - headers already sent by (output started at D:\Inetpub\wwwroot\nt04\jamestranstech.com\register1.php:156) in D:\Inetpub\wwwroot\nt04\jamestranstech.com\register1.php on line 158


    I dunno if it work or not but I always got that error, sometimes it's just that your page after submitted form have spaces... make sure there's no space in between php code and html... it worth it to try...

    <?php echo "sample php code";?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •