Results 1 to 5 of 5

Thread: need php script

  1. #1
    xxtoni's Avatar
    xxtoni is offline xxtoni
    Join Date
    Jan 2010
    Posts
    353
    Thanks
    16
    Thanked 42 Times in 34 Posts

    need php script

    Greetings
    I am not a programmer but need a relatively simple (or at least i think so) php script.
    I need a script that would allow a visitor to input information like:Name,Surname,City,zip code etc. to a web form and then save that information into a database or even better something like excel spreadsheet located on the ftp server.After the user clicks the "submit" button the script should send him and one of our administrators a email
    The text in the email of the user should be something like "Thank you for submitting your information to us,we have received it and will contact you after we have reviewed it"
    and the email for the administrator should contain something like
    "A new user has submitted his information to us"
    I hope you can help me with this and tell me where i can find such a script ?

  2. #2
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    Breifly searching I found one that looks to fit your needs you would need to edit to fit your exact needs but allows a sign up with a courtesy email..

    Might be a good start for you Contact PHP Email Form Script with free contact php code

    But not sure i saves the info or not. Might be others on that site though

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  3. Thanked by:

    m42 (30 March, 2010), Naweed (6 April, 2010), Will.Spencer (2 April, 2010)

  4. #3
    Andy101's Avatar
    Andy101 is offline Code Otaku
    Join Date
    Aug 2009
    Location
    Kanazawa
    Posts
    1,314
    Thanks
    178
    Thanked 309 Times in 236 Posts
    This is easy to code for a PHP programmer, especially when your preference is to save to a spread sheet format.

    Here are some tips for specifying your requirements:

    For this I would save as .csv (comma-separated values) to the server. This file would be appended with newly submitted form data.

    The post vars Keys, would be the column headings and the post values, the data.

    If the file doesn't yet exist, the new CSV file would be created with the Keys as the column headings. Then data is appended as new lines of comma-separated values.

    The format of the CSV file is very simple such as:

    Name,Email
    Fred,fred@site.com

    You can then download this and import into Excel or any other spreadsheet.

    For the web form, the submitted data needs to be sanitized i.e. run through filters that check for valid data.

    Also, I would throttle the submission rate from the same IP address and also include the IP address in the table (so you can block it if need be).

    These measures are to cut down on spam.

    And, ensure that the file on the server is not readable by the public by setting the file permissions appropriately.

    Use of a captcha would be useful too.
    Otaku CMS - Import a WordPress blog and manage your site using single-page App technology
    Angular Skills - new site about Front-end App. programming

  5. Thanked by:

    Will.Spencer (2 April, 2010)

  6. #4
    xxtoni's Avatar
    xxtoni is offline xxtoni
    Join Date
    Jan 2010
    Posts
    353
    Thanks
    16
    Thanked 42 Times in 34 Posts
    Quote Originally Posted by Andy101 View Post
    This is easy to code for a PHP programmer, especially when your preference is to save to a spread sheet format.

    Here are some tips for specifying your requirements:

    For this I would save as .csv (comma-separated values) to the server. This file would be appended with newly submitted form data.

    The post vars Keys, would be the column headings and the post values, the data.

    If the file doesn't yet exist, the new CSV file would be created with the Keys as the column headings. Then data is appended as new lines of comma-separated values.

    The format of the CSV file is very simple such as:

    Name,Email
    Fred,fred@site.com

    You can then download this and import into Excel or any other spreadsheet.

    For the web form, the submitted data needs to be sanitized i.e. run through filters that check for valid data.

    Also, I would throttle the submission rate from the same IP address and also include the IP address in the table (so you can block it if need be).

    These measures are to cut down on spam.

    And, ensure that the file on the server is not readable by the public by setting the file permissions appropriately.

    Use of a captcha would be useful too.
    Well for me it would be hard because i am not a programmer,do you know where i could find a finished script or someone who can write one for me ?

  7. #5
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    I would try and ask dtkguy he does very good work and is very patient. He is a member here so just search his name.

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

Similar Threads

  1. Replies: 4
    Last Post: 20 July, 2011, 20:06 PM
  2. Replies: 0
    Last Post: 5 March, 2010, 11:03 AM
  3. Replies: 1
    Last Post: 14 January, 2010, 18:05 PM
  4. Replies: 2
    Last Post: 10 December, 2009, 18:25 PM
  5. Replies: 0
    Last Post: 19 October, 2009, 13:45 PM

Tags for this Thread

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
  •