Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Get information from entry
- $name = $_POST['name']; //id field from POST above
- $description = $_POST['description']; //expiration field from POST above
- // connect to the MySQL database server
- $dbhost = 'localhost';
- $dbuser = 'root';
- $dbpassword = 'root';
- $database = 'stage.sanatorium';
- $db = mysql_connect($dbhost, $dbuser, $dbpassword) or die("Connection Error: " . mysql_error()); // connect to the MySQL database server
- mysql_select_db($database) or die("Error connecting to db."); // select the database
- $result = mysql_query("INSERT INTO " . $database ."(name, description) VALUES ('$name', '$description')");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement