Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: I'm not sure if this is a PHP thing... but for Email

  1. #1
    Join Date
    Sep 2006
    Location
    Fairfield California!
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking I'm not sure if this is a PHP thing... but for Email

    Ok... this is what I want to do, I have Dreamweaver to work with if you needed that information. What I want to do is have a website where people fill out information with selecting, Male or Female or fill in there Location stuff like that, which I already know how to do, Im just letting you know all the details... heres the part I dont know what to do!

    When I want them to submit it, it gathers all the information (correct information) into and email and has them send it to my email adress, WHICH I DONT WANT!!! Is there a way where when they press submit it automaticly sends it to my email with out the email page. Sorry if any of this sounds confusing! But Please Help!

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

    Default

    You probably have <form action="mailto:your@email.com">, right?

    The action is where the form data is sent. Using that, it's the easy way out... just use the person's email program to send it to you. But as you've discovererd, it's annoying, and not too compatible.

    So, the solution is to use php to interpret the data then send.

    First, in your form tag-- <form method="post" action="nextpage.php">
    (You can also use method="get", but that puts the data into the next url, like nextpage.php?variable=value, which is useful, but gets to be a bit much when a lot of data is sent.)

    Next, using php, those values are available-
    $_POST['fieldname'] is the value of the field sent that had the name "fieldname", like <input name="fieldname">.

    Do what you want with it using php (just get a basic idea of what's going on and it's pretty easy.)

    I'd suggest visiting php.net for more info.

    After you're done, use the mail() function to send it to your email.

    Info on that also available at php.net.
    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

  3. #3
    Join Date
    Sep 2006
    Location
    Fairfield California!
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default kool

    Now is there a way possible without using php, that doesn't conflicted with the email situation?

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

    Default

    PHP is a particular language. There are other server side programming languages available.

    Also, you can specify, as the action, a free form interpreter. Just google "form mailer".
    Basically, it will take the data, then send it to you.
    However, you won't then have control over the format.. it'll just do it like:
    fieldname: data
    fieldname: data
    etc.
    And, the other problem is that it'll usually come with ads.

    However, if you don't want to get into the coding side of things, this is a good solution.
    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

  5. #5
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    If you look for a form mailer check with you host first. Many provide one for free.

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

    Default

    Yes, that's true, and would be most likely to be customizable and/or free of ads.
    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

  7. #7
    Join Date
    Sep 2006
    Location
    Fairfield California!
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok... I did what you said with the form, its method="post" and the action= "nextpage.php" but you kinda lost me after that? when I preview it and click on the button it takes you to the nextpage.php but im not sure why i did that.


    "Next, using php, those values are available-
    $_POST['fieldname'] is the value of the field sent that had the name "fieldname", like <input name="fieldname">."

    I dont under stand, do I creat a page thats called nextpage.php and then....what? sorry im new to php...

  8. #8
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    My advice is to find a form mailer.

  9. #9
    Join Date
    Sep 2006
    Location
    Fairfield California!
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Im a little confused on how that works too? can you try and explain it a little more and what I use and do? my internet provider is comcast and its cable and i sure there isn't a form mailer with it...

  10. #10
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    I said your host may provide one. By that I mean the person who runs the server that presents the page to the web.

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
  •