Problem with form for website

  • kevintcompton
  • Newbie
  • Newbie
  • kevintcompton
  • Posts: 14

Post 3+ Months Ago

I have a survey on a website and I need it to be able to submit when someone clicks the submit button. How do I code it so that the form submits the survey once someone has filled it out?
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

submit where?
  • kevintcompton
  • Newbie
  • Newbie
  • kevintcompton
  • Posts: 14

Post 3+ Months Ago

To an e-mail address.
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

you tried adding


Code: [ Select ]
action="mailto:email.com"


to the form tag?
  • kevintcompton
  • Newbie
  • Newbie
  • kevintcompton
  • Posts: 14

Post 3+ Months Ago

Ok I got it to work, you were right...now how do i proccess that text data that comes? Are there programs for that?
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

you mean, how to make it show in a particular manner?
  • kevintcompton
  • Newbie
  • Newbie
  • kevintcompton
  • Posts: 14

Post 3+ Months Ago

Ya, it sends me a text file that has a bunch of jumbled words with the information mixed in, I want something organized and legible.
  • Sk8erGuy
  • Student
  • Student
  • Sk8erGuy
  • Posts: 74

Post 3+ Months Ago

add it to a mysql table and extract to a page that you want it to show up on. Learn about arrays and variables i think would help you.
  • kevintcompton
  • Newbie
  • Newbie
  • kevintcompton
  • Posts: 14

Post 3+ Months Ago

So then I would have to buy mysql to do this?
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

MySQL is free and if your lucky (garentyed you have this if you pay for hosting) your host has it already installed on to there server.

what you might want to do is use the mail() function

PHP Code: [ Select ]
 
$emailto = "email@domain.com";
 
$emailsubject = "subject body";
 
$emailbody = "
 
var1: $var1 \n var2: $var2 // and so on
 
";
 
 
 
$emailfrom = $_POST['email']; /* this is the emaill addy they posted if they have one or you could use there name or such */
 
mail('$emailto', '$emailsubject', '$emailbody', 'From: $emailfrom');
 
 
  1.  
  2. $emailto = "email@domain.com";
  3.  
  4. $emailsubject = "subject body";
  5.  
  6. $emailbody = "
  7.  
  8. var1: $var1 \n var2: $var2 // and so on
  9.  
  10. ";
  11.  
  12.  
  13.  
  14. $emailfrom = $_POST['email']; /* this is the emaill addy they posted if they have one or you could use there name or such */
  15.  
  16. mail('$emailto', '$emailsubject', '$emailbody', 'From: $emailfrom');
  17.  
  18.  

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 47 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.