TarsierSpectral Posted February 7, 2008 Share Posted February 7, 2008 I am new to PHP. I am creating forms. What are the ways to submit form data? I know I can have it emailed but then I would have to have email server installed. What else can I do with form data if I can't have it emailed? Link to comment https://forums.phpfreaks.com/topic/89905-forms/ Share on other sites More sharing options...
pocobueno1388 Posted February 7, 2008 Share Posted February 7, 2008 You can store it in a database or text file. Take a look at this tutorial for more on working with forms: http://www.tizag.com/phpT/postget.php Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460822 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 You can store it in a database or text file. Take a look at this tutorial for more on working with forms: http://www.tizag.com/phpT/postget.php thanks. Once it is in a database, how does a person receive the data? Can a nontechnical user easily retrieve it? I mean I know I can retrieve it for them, but this is not an automated process. Is there an easy way of doing this? Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460836 Share on other sites More sharing options...
ricerocket Posted February 7, 2008 Share Posted February 7, 2008 It depends on what you want it to do, when you know how you want it submitted then I might be of some help I'm pretty proficient when it comes to form processing. For example it you had a contact form you would want it to be mailed to you, if you had a registration form you would the it to be inserted into a database, etc. etc. Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460837 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 It depends on what you want it to do, when you know how you want it submitted then I might be of some help I'm pretty proficient when it comes to form processing. For example it you had a contact form you would want it to be mailed to you, if you had a registration form you would the it to be inserted into a database, etc. etc. It is a registration form. Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460842 Share on other sites More sharing options...
ricerocket Posted February 7, 2008 Share Posted February 7, 2008 Registration forms are quite simple if you know how they work heres a website that explains how to make a simple registration form that uses mysql and a few other files: http://www.phpeasystep.com/workshopview.php?id=6 Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460862 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 Registration forms are quite simple if you know how they work heres a website that explains how to make a simple registration form that uses mysql and a few other files: http://www.phpeasystep.com/workshopview.php?id=6 thanks, but how will a user access all the data in the database? Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460866 Share on other sites More sharing options...
ricerocket Posted February 7, 2008 Share Posted February 7, 2008 What will the user be logging into? Members page? Special content? And in what way do you mean "content in the database"? Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460872 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 You should Set up the form first, by looking at some HTML tutorials, then try searching for "Form Validation", and "Mysql"... Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460876 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 What will the user be logging into? Members page? Special content? And in what way do you mean "content in the database"? Once people register for an event, using PHP form, all the data from the registration form will end up in a database. Now, once the registration period is over, whoever is holding the event would like to see who has registered for it. How do they do that? Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460882 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 You should Set up the form first, by looking at some HTML tutorials, then try searching for "Form Validation", and "Mysql"... I know how to setup a form. I just want to find out what the options are for capturing the form data Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460891 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 You should Set up the form first, by looking at some HTML tutorials, then try searching for "Form Validation", and "Mysql"... I know how to setup a form. I just want to find out what the options are for capturing the form data What do you mean capture the data? If by Capture you Mean use the $_POST vars, or $_GET, then you use: Lets say your form action is do_form.php <?php $submit = (isset($_POST['Submit'])) ? TRUE : FALSE $var1 = ($_POST['var']=="") ? TRUE : $_POST['var']; $var2 = ($_POST['var2']=="") ? TRUE : $_POST['var2']; if($submit){ if($var1 || $var2){ echo "Please Fill in All the Field"; } } ?> Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460898 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 You should Set up the form first, by looking at some HTML tutorials, then try searching for "Form Validation", and "Mysql"... I know how to setup a form. I just want to find out what the options are for capturing the form data What do you mean capture the data? If by Capture you Mean use the $_POST vars, or $_GET, then you use: Lets say your form action is do_form.php <?php $submit = (isset($_POST['Submit'])) ? TRUE : FALSE $var1 = ($_POST['var']=="") ? TRUE : $_POST['var']; if($submit){ if($var1){ echo "Please Fill in All the Field"; } } ?> Once a person fills out the form, I can have the information they entered on the form emailed, stored in a database or txt file. Any other option? Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460902 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 You can Email it yes, Store it in a DB, or in a TXT file, but those are your only and best options I THINK. Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460909 Share on other sites More sharing options...
Wolphie Posted February 7, 2008 Share Posted February 7, 2008 You could possibly write it to an XML format also. Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460916 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 Your best Option is a DB if you don't want things to get complicated using a FlatFile. Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460918 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 You can Email it yes, Store it in a DB, or in a TXT file, but those are your only and best options I THINK. Since, I can't have it emailed because there is no email server, I am left with DB and txt. Let's say I go with DB. How can the person who needs to see who registered, and who doesn't know how to use DB, see who registered for his/her event? Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460920 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 You can Email it yes, Store it in a DB, or in a TXT file, but those are your only and best options I THINK. Since, I can't have it emailed because there is no email server, I am left with DB and txt. Let's say I go with DB. How can the person who needs to see who registered, and who doesn't know how to use DB, see who registered for his/her event? If you want to see what Event the user registered for (I presume this is your question), Then make a ROW in your USER table called "Event", and Insert this var from either the $_POST['event'] or maybe in the HTTP VAR $_GET['event'] into the db ROW "Event", and a USER_ID for the His/Her... Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460924 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 You can Email it yes, Store it in a DB, or in a TXT file, but those are your only and best options I THINK. Since, I can't have it emailed because there is no email server, I am left with DB and txt. Let's say I go with DB. How can the person who needs to see who registered, and who doesn't know how to use DB, see who registered for his/her event? If you want to see what Event the user registered for (I presume this is your question), Then make a ROW in your USER table called "Event", and Insert this var from either the $_POST['event'] or maybe in the HTTP VAR $_GET['event'] into the db ROW "Event", and a USER_ID for the His/Her... that wasn't my question, read my last post Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460927 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 You can Email it yes, Store it in a DB, or in a TXT file, but those are your only and best options I THINK. Since, I can't have it emailed because there is no email server, I am left with DB and txt. Let's say I go with DB. How can the person who needs to see who registered, and who doesn't know how to use DB, see who registered for his/her event? If you want to see what Event the user registered for (I presume this is your question), Then make a ROW in your USER table called "Event", and Insert this var from either the $_POST['event'] or maybe in the HTTP VAR $_GET['event'] into the db ROW "Event", and a USER_ID for the His/Her... that wasn't my question, read my last post Then I am sorry, I didn't understand your question, if you are willing to repeat it in a more clear way then I would be happy to answer you back. How can the person who needs to see who registered, and who doesn't know how to use DB, see who registered for his/her event? You want to see who registered for his/her event, I don't even know who his/her is? Is it you, or the members of your site? Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460937 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 You can Email it yes, Store it in a DB, or in a TXT file, but those are your only and best options I THINK. Since, I can't have it emailed because there is no email server, I am left with DB and txt. Let's say I go with DB. How can the person who needs to see who registered, and who doesn't know how to use DB, see who registered for his/her event? If you want to see what Event the user registered for (I presume this is your question), Then make a ROW in your USER table called "Event", and Insert this var from either the $_POST['event'] or maybe in the HTTP VAR $_GET['event'] into the db ROW "Event", and a USER_ID for the His/Her... that wasn't my question, read my last post Then I am sorry, I didn't understand your question, if you are willing to repeat it in a more clear way then I would be happy to answer you back. How can the person who needs to see who registered, and who doesn't know how to use DB, see who registered for his/her event? You want to see who registered for his/her event, I don't even know who his/her is? Is it you, or the members of your site? As I stated before, it wouldn't be me. I would be someone else who needs to be able to see all the things in that DB, but they don't know how to use DB. Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460964 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 You print the Data records using a mysql_query and then looping through the data. If the user doesnt know DB then you print it out using PHP. Is this what you ment? Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-460978 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 You print the Data records using a mysql_query and then looping through the data. If the user doesnt know DB then you print it out using PHP. Is this what you ment? but that process involves me doing it for them. They need to be able to get the data records themselves. That's why email seemed the best option but it won't work without the e-mail server. That's why I asked if there was another way. Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-461058 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 Your not doing for them, you simply make a page and print out all the registered users. This process will only be done once, all they have to do is view the page and when a user registers, it updates that page also... Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-461063 Share on other sites More sharing options...
TarsierSpectral Posted February 7, 2008 Author Share Posted February 7, 2008 Your not doing for them, you simply make a page and print out all the registered users. This process will only be done once, all they have to do is view the page and when a user registers, it updates that page also... Thanks. That's all I wanted to find. Thanks again Link to comment https://forums.phpfreaks.com/topic/89905-forms/#findComment-461069 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.