Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $id = isset($_GET['id']) ? $_GET['id'] : 'error';
- echo $id;
- $server = "localhost";
- $username = "peter";
- $password = "abc123";
- $dbName = "my_db";
- $con = mysql_connect($server, $username,$password);
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db($dbName, $con);
- mysql_query("INSERT INTO Persons (FirstName, LastName, Age) VALUES ('Peter', 'Griffin',35)");
- mysql_query("INSERT INTO Persons (FirstName, LastName, Age) VALUES ('Glenn', 'Quagmire',33)");
- mysql_close($con);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment