December 26th, 2012, 02:19 PM
How to get the info "array" created by the Post command stored into a php/mysql db.
A little help please. I have a form that collects the ingredients for recipes entered into a cookbook.
I am using $_Post to collect and display the info just entered in a form to form.php.
Can you help me with how to get the info "array" created by the $_Post command stored into a php/mysql db.
It has been a long time since I have used any of this about 18 yrs.
This is the Java script used to create each input box. Three are required for each ingredient "Name", "Amount", "Measure". New row created each time Add New Input is clicked.
Thank You for any help you can give.
var container = document.getElementById('ingredients');
//Create the label
var e = document.createElement('label');
var dv = document.createElement('div');
e.innerHTML = 'Name:';
//Create the textbox
e = document.createElement('input');
December 26th, 2012, 06:10 PM
please show us the PHP code and the table(s) you currently have.
For the database interaction, use PDO. Do not use the ancient mysql_ functions that are still recommended by bad tutorials. They're long obsolete and will be removed sooner or later.