Hi, I would need some help from someone who is willing to help me, and I will appreciate that. Well, I have an website with abt. 20K Unique visitors per day, and I want to "subscribe" them. Therefore I need to create an form with Name, Surname, Address 1, Address 2, City, Country, Zip, Telephone, Email, Comment box and maybe 2 other forms. After visitor writes down and click submit button I need to send an email to the user.. Thank you email.. Also I need to store his information on an csv file somewhere in Server, not each user on seperate csv file, but all in one scv file. Well.. My problem may be from beginning but where I don't understand most.. I don't have clue how to do it is to save details on csv. Thanks in advance, Regards
I assume you need the CSV file in order to email these people? I'd suggest using a database, and export it through phpmyadmin/write your own script to export. If not, you'd need to use functions like fputcsv and fgetcsv. This tutorial might help you.
Sky Ak47. Thnx bro! It helped me very much. Is there any ready script which does the same? I don't have so much time on developing new one ? Thnx in advace
A quick google search turned up this site http://www.quadodo.net/, It is pretty easy to setup a basic login/out script yourself.
For this you need to create a client side form for all the required fields. and small javascript code to validate user data. Small php script for inorder to receive user entered data and save them in csv. Make sure before writing data in csv you are validating them once again on server side(in php code). This is easily doable... If you need any left to write it, let me know i can help you. Sheetal
<?php if(!isset($_POST['submit'])) }else{ if(!isset($_POST['first_name']) ¦¦ strlen($_POST['first_name']) <= 0) { echo 'Error: You did not enter first name.<br />'; exit(); } if(!isset($_POST['last_name']) ¦¦ strlen($_POST['last_name']) <= 0) { echo 'Error: You did not enter your last name.<br />'; exit(); } if(!isset($_POST['member_addressl']) ¦¦ strlen($_POST['member_address']) <= 0) { echo 'Error: You did not enter your address.<br />'; exit(); } if(!isset($_POST['address2']) ¦¦ strlen($_POST['address2']) <= 0) { echo 'Error: You did not enter your address2<br />'; exit(); } if(!isset($_POST['member_city']) ¦¦ strlen($_POST['member_city']) <= 0) { echo 'Error: You did not enter your City<br />'; exit(); } if(!isset($_POST['member_state']) ¦¦ strlen($_POST['member_state']) <= 0) { echo 'Error: You did not enter your State<br />'; exit(); } if(!isset($_POST['member_email']) ¦¦ strlen($_POST['member_email']) <= 0) { echo 'Error: You did not enter your email Address<br />'; exit(); } if(!isset($_POST['membership']) ¦¦ strlen($_POST['membership']) <= 0) { echo 'Error: You did not enter your Membership Level<br />'; exit(); } { echo '<b><center>Thank you for our Membership Application is being processed.</center></b><br/><br/>'; } //send mail. $to = $_POST['email']; $subject = "Thank you for"; $message .= "First Name: " . $_POST['first_name'] . "\n"; $message .= "Last Name: " . $_POST['last_name'] . "\n"; $message .= "email: " . $_POST['member_email'] . "\n"; $message .= "Joined the blah blah.....\n"; $message .= "send membership information asap"; if (mail ($to, $subject, $message, 'From: $email\n')) { echo 'Again....Thanks for joining.<a href="#"> Back to Message Board</a>'; } } ?>
That is one of the reasons that i started using PHP code generators, if i try to do it coding, by myself i would have to search a bit to remember stuff, and I would lose something like 30mins to 2 hours to do it, depending on the complexity of the things. Using scriptcase (my favorite php code generator) I would never lose more then 5 minutes to do something like this.
That's fine if you don't mind the overhead, server load and slowness, but the code ScriptCase generates for a simple "write the info to a csv file and send an email" function is like buying a herd of elephants, keeping them in a huge cage, and lowering the cage onto a peanut to crack the shell. Rube Goldberg would be proud. Learn programming, learn some Javascript and PHP, and a script like that will take you about 5 minutes to conceive, write, debug and deploy. About the same time it'll take to do it in a script generator, but secure and extremely light.
That is one of the reason i started using php code generators, i dont want to lose time trying to create code for simple stuff, the one i like the most is scriptcase, go take a look, i think you can use it as trial for free. I realy like the email sending, already created some libraries using the scripcase, it is realy usefull. I can send you out if you like to. Let me know!