Results 1 to 8 of 8

Thread: PHP prompt email

  1. #1
    Join Date
    Mar 2008
    Location
    West Salem, WI
    Posts
    22
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default PHP prompt email

    I am looking for a code that will prompt the viewer for their email when they click to open a file or click to download a file and then save that email some where. I posted in html about this same thing but i posted that because I wanted to know if you could do it with out php. Thanks

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    you can do it with javascript, using a cookie, but that would save it to the local machine of the user... I am going to assume that you want to track whom has downloaded what file? to do that you need a server side language like php, and a place to store the information... either in a database table or in a text file.

  3. #3
    Join Date
    Mar 2008
    Location
    West Salem, WI
    Posts
    22
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    yes i would like to track who downloads the file. so if i use php how do i put it to use in my website.

  4. #4
    Join Date
    Mar 2008
    Location
    West Salem, WI
    Posts
    22
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    could some body push me in the right direction that would be great, cause right now i dont know where to start

  5. #5
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by Drewsterritz View Post
    could some body push me in the right direction that would be great, cause right now i dont know where to start
    Could you provide more info on how the form that you're using is structured? In your other post you said something about checkboxes and the user being emailed. I'm getting another story form this post.

    From this post, this is what I'm getting.

    1. User enters email.
    2. User clicks submit.
    3. User's email is saved in a txt file or database.

    Is that right? If so, do you want to use a text file or database.

  6. #6
    Join Date
    Mar 2008
    Location
    West Salem, WI
    Posts
    22
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    that is right and i am not sure if i should use a txt file or db because i am new to the whole thing of db and php

  7. #7
    Join Date
    Mar 2008
    Location
    West Salem, WI
    Posts
    22
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    What this is for is when I user comes to my site and clicks a link that says "Click here for more information". The user will then be prompted for their name and email and when submitted they information will be sent to a specific email or file or db. I am just so new to php that I am not sure where to start. If any one could help that would be great. Thanks again!

  8. #8
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    642
    Thanks
    284
    Thanked 15 Times in 15 Posts

    Default

    I'm no expert but this is how I do it...

    1. When they click for more information, present them with a little form that captures their name and email address.
    2. Send them an email with whatever info you are sending.
    3. Connect to the database.
    4. Load the name & email address into a database table like in this example:

    $query = "INSERT INTO customers
    ( name, email, requestdate )
    VALUES
    ( '$name', '$email', '$requestdate' ) ";

    5. Take them to a result page eg. "Thank you for your request."

    Hope that helps a bit. erin
    Last edited by kuau; 03-21-2008 at 02:28 AM. Reason: code tags messed up the format

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
  •