Boxerman Posted March 17, 2008 Share Posted March 17, 2008 Hi guys, i use a program called FSACARS and i have to go into the phpmyadmin to add people on the database... i was wondering if anyone knows how i can get a php form to do this, so they fill stuff out and it adds them to the database automatically! thanks! James Quote Link to comment https://forums.phpfreaks.com/topic/96543-adding-to-database/ Share on other sites More sharing options...
peranha Posted March 17, 2008 Share Posted March 17, 2008 Search google for a php register system. That will get you started. Quote Link to comment https://forums.phpfreaks.com/topic/96543-adding-to-database/#findComment-494060 Share on other sites More sharing options...
aschk Posted March 17, 2008 Share Posted March 17, 2008 Create you html page with the form details in it. Post it to the process.php page, which takes the form variables. With the form variables create an SQL statement which INSERT's the information into the database. Easy peasy... If you post some sample/dev code we'll help you along. Quote Link to comment https://forums.phpfreaks.com/topic/96543-adding-to-database/#findComment-494089 Share on other sites More sharing options...
Boxerman Posted March 17, 2008 Author Share Posted March 17, 2008 Thanks! where do i start, ive got the form made up, how do i link it with the database? Quote Link to comment https://forums.phpfreaks.com/topic/96543-adding-to-database/#findComment-494433 Share on other sites More sharing options...
peranha Posted March 17, 2008 Share Posted March 17, 2008 <?php //Server to connect to $server = "server"; //Database to connect to $db = "database"; //User Name to connect $user = "user"; //Password to connect $pass = "password"; // open connection $connection = mysql_connect($server, $user, $pass) or die ("Unable to connect!"); // select database mysql_select_db($db) or die ("Unable to select database!"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/96543-adding-to-database/#findComment-494456 Share on other sites More sharing options...
Boxerman Posted March 18, 2008 Author Share Posted March 18, 2008 ahh i understand a little now... the form must be the same as this... http://www.vipersim.com/jamesm/pilot_roster.php it must have all the same fields... like rank, remarks etc... Quote Link to comment https://forums.phpfreaks.com/topic/96543-adding-to-database/#findComment-495053 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.