I had 1 database with 3 table inside. And Now I want to add text thru a form in browser to the last table (table number 3).
anybody here can tell me ?
$query = "INSERT into table1 (textfield) VALUES ('$InputText');";
this assumes that you are connected to mysql, and are using the correct DB.
$InputText is the name of one of your form fields.
That should do it.
yea. it's will works for one input form only how about if I want to combine this input form
<input type=text name=name> <input type=text name=age> <input type=text name=sex>
and I want this form will generate in my table as <name>John</name> <age>18</age> <sex>male</sex>
so put in a value that is commonly unused in submission, like "&" to seperate your items. then when you fetch them from the db, run explode("&",$row[0]) (assuming $row is your return variable). This will split it into an array of 3 elements, allowing you to print each item individually.