Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: form mail script help

  1. #11
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    nothing more, also I forgot to close the form tag in the html file. All the submit button needs is two attributes (more if using javascripts or DHTML scripting) the type (submit) and the value (Click here to Send!). After the submit button, if you do not have any other for items, you should close the form tag by adding </form> at the end. I forgot to do so in the example above, due to the fact that I just typed that up.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  2. #12
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by thetestingsite
    nothing more, also I forgot to close the form tag in the html file. All the submit button needs is two attributes (more if using javascripts or DHTML scripting) the type (submit) and the value (Click here to Send!). After the submit button, if you do not have any other for items, you should close the form tag by adding </form> at the end. I forgot to do so in the example above, due to the fact that I just typed that up.
    I'm a bit confused sorry... So the two pieces of code you showed me do they go into the same file? Once the user clicks submit on the form how does it know what to do?

  3. #13
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    k...they are two completly separte files. the first one is an HTML document called contact.html. When the user click submit on that form, then the form uses the action (located in the <form> tag) - in this case it's contact.php. The second piece of code is contact.php.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  4. #14
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I got this error when I clicked Submit

    HTML Code:
    Parse error: parse error, unexpected T_SL in e:\USERS\freewheelin\www\content\contact.php on line 27

  5. #15
    Join Date
    May 2006
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I would just recommend using this: http://www.eformmailer.com/ . its a free wizard that makes a PHP form for you.

  6. #16
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by sartajc
    I would just recommend using this: http://www.eformmailer.com/ . its a free wizard that makes a PHP form for you.
    I still get errors using the free wizard... and also it redirects to a plain page...
    HTML Code:
    Message could not be sent.
    Mailer Error: Language string failed to load: instantiate
    
    Thanks!
    Your mail has been sent.

  7. #17
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by tomyknoker
    I got this error when I clicked Submit

    HTML Code:
    Parse error: parse error, unexpected T_SL in e:\USERS\freewheelin\www\content\contact.php on line 27
    Anyone know what this error could be referring too?

  8. #18
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I've tried the code on my home server and it works perfectly (with the exception of the mail part being that I dont have a mail server yet.) Although I have also tried it on my website's server and it had worked perfectly on that as well...check to make sure you have not added any spaces before or after the ending HERE; those are the only times that I recieved an error about it.
    Last edited by thetestingsite; 10-27-2006 at 05:46 AM. Reason: mispelled a few words
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #19
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Could you take a look at the file? It's wierd I just used your two files, without changing a thing and no luck... You can test it here http://www.tomsynnott.com/email_form/contact.htm

  10. #20
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    link broken 404 error (cannot find page)

    UPDATE: works now, and I checked it, now it says unexpected T_STRING on line 17... line 17 is the variable $msg.....check to make sure the last line before this one is ended by a semicolon ( also, as i said before I used it on my home server once again and still cannot reproduce the error message.

    Another UPDATE: i reproduced the error, make sure the the $msg variable is a line or two below the last $_REQUEST[field]; or delete the comment behind that one. That was the only thing that I could see
    Last edited by thetestingsite; 10-27-2006 at 05:59 AM. Reason: worked now...
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

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
  •