Jump to content

Forms


TarsierSpectral

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.