Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mysql_host = 'ephesus.cs.cf.ac.uk';
- $mysql_user = 'c1018921';
- $mysql_pass = '';
- $name = $_POST['name'];
- $surname = $_POST['surname']; // Make sure you check both of these for mysql injection if this is proper work.
- mysql_connect($mysql_host, $mysql_user, $mysql_pass);
- mysql_select_db('c1018921');
- mysql_query("INSERT INTO `Info` (`name`, `surname`) VALUES ('{$name}', '{$surname}')");
- ?>
- <form action="" method="post">
- <br><label>name</label><br />
- <input type="text" name="name" value="" /><br />
- <br><label>surname</label><br />
- <input type="text" name="surname" value="" /><br />
- <input type="submit" name="submit" value="Register" />
- </form>
Add Comment
Please, Sign In to add comment