Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include('header.php');
- $name = $_POST['name'];
- $score = $_POST['score'];
- $dept = $_POST['dept'];
- $MyDB->prep("INSERT INTO demo (`id`,`name`,`score`,`dept`, `date`) VALUES ('','$name','$score','$dept','$date')");
- // Bind a value to our :id hook
- // Produces: SELECT * FROM demo_table WHERE id = '23'
- $MyDB->bind(':date', $date);
- // Run the query
- $MyDB->run();
- header('Location:index.php');
- exit;
- Warning: Cannot modify header information - headers already sent by (output
- started at /Applications/MAMP/htdocs/testygubbins/OO/test/header.php:15) in
- /Applications/MAMP/htdocs/testygubbins/OO/test/form.php on line 16.
- <?php
- include('class.user.php');
- include('class.Connection.php');
- $date = date('Y-m-j');
- ?>
- <html>
- <head>
- <link rel=StyleSheet href="css/style.css" type="text/css" media=screen>
- <title>Test</title>
- </head>
- <body>
- <div id="page">
- include('class.user.php');
- include('class.Connection.php');
- $date = date('Y-m-j');
- **ob_start();**
- include('header.php');
- $name = $_POST['name'];
- $score = $_POST['score'];
- $dept = $_POST['dept'];
- $MyDB->prep("INSERT INTO demo (`id`,`name`,`score`,`dept`, `date`) VALUES ('','$name','$score','$dept','$date')");
- // Bind a value to our :id hook
- // Produces: SELECT * FROM demo_table WHERE id = '23'
- $MyDB->bind(':date', $date);
- // Run the query
- $MyDB->run();
- header('Location:index.php');
- **ob_end_flush();**
- exit;
- <?php
- include('class.user.php');
- include('class.Connection.php');
- ?>
- <script type="text/javascript">
- window.location.href='index.php';
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement