Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "localhost";
- $username = "phpdood";
- $password = "PopenHsesameP";
- $database = "kj_database2";
- mysql_connect($host,$username,$password);
- @mysql_select_db($database) or die("Unable to select database: ". mysql_error());
- $name = $_POST['name'];
- $age = $_POST['age'];
- $eye_colour = $_POST['eye_colour'];
- $height = $_POST['height'];
- $weight = $_POST['weight'];
- $query = "INSERT INTO kj_datatable2 (name,age,eye_colour,height,weight)VALUES('$name',$age,'$eye_colour','$height',$weight)";
- print $query;
- mysql_query($query);
- mysql_close();
- ?>
- <script type="text/javascript">
- window.location = "/index.html";
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement