PDA

View Full Version : Dbase script


gigiloumill
07-07-2009, 05:40 PM
Does anyone have a script for sending forms to a database?

Corrosive
07-07-2009, 05:59 PM
Does anyone have a script for sending forms to a database?

It kind of depends what information you have in your form and the structure of your database as to what your script should look like. Maybe try hotscripts.com and see if you can mash anything up from there.

gigiloumill
07-07-2009, 06:32 PM
I can't figure out how to send form info to a database. I configured phpmyadmin, it's working on the testing server but I can't figure out how to send from form to it.

edbr
07-08-2009, 05:31 AM
it requires an insert statement. im sure there is a tutorial for this in tutorials on this forum. it could look like this
<?php
$title=$_POST['title'];
$text=$_POST['text'];
$text_2=$_POST['text_2'];


$query="INSERT INTO news (id,title,text) VALUES ('','$title','$text','$text_2')" ;
$result = mysql_query($query)or die (mysql_error());
?>

first declaring your variables from the form. then insert matching db fieldnames with info you would collect

jaymo
07-11-2009, 04:59 PM
There are some useful functions that you can just include in your scripts. I saw one on anyexample which will get you started