sws Posted November 10, 2006 Share Posted November 10, 2006 Hi, I've created a form with multiple drop down boxes in which users can select from the list.Once they've done this for every selection, I need to create the submit button and write the values to the database. I'd also like to be notified via email once a user has submitted a form. Can I do both with the same submit button ?Can anyone tell me how to do this ? Link to comment https://forums.phpfreaks.com/topic/26882-writing-form-data-to-a-mysql-db/ Share on other sites More sharing options...
Psycho Posted November 10, 2006 Share Posted November 10, 2006 Yes, you can do it. But, you need to realize that it has nothing to do with the "submit". The submit button merely submits the contents of the form in name/value pairs to the page specified in the form action tag. The page that receives the data can process it however you want.There are many tutorials out there that can show you step-by-step how to insert the data to a database and how to send it via email.The data in the form will be avilable in the php page receiving the data in the form $_POST[[i]fieldname[/i]. So if you have a 'name' field and the user enters 'John', then the variable $_POST[name] would be equal to 'John' Link to comment https://forums.phpfreaks.com/topic/26882-writing-form-data-to-a-mysql-db/#findComment-122918 Share on other sites More sharing options...
sws Posted November 10, 2006 Author Share Posted November 10, 2006 Great. Thanks for your help. So basically I need a submit.php script that takes data from the form and writes it to the db.Got it. Thanks so much. Link to comment https://forums.phpfreaks.com/topic/26882-writing-form-data-to-a-mysql-db/#findComment-122919 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.