Jump to content

Adding to database...


Boxerman

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/96543-adding-to-database/#findComment-494089
Share on other sites

<?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!");

?>

Link to comment
https://forums.phpfreaks.com/topic/96543-adding-to-database/#findComment-494456
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.