This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <?php | |
| $dbh = new PDO('mysql:dbname=reddit;host:localhost', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); | |
| if(!empty($_POST)) { | |
| $query = $dbh->prepare('INSERT INTO comments (post, user, body) VALUES (?, ?, ?)'); | |
| $query->execute(array($_GET['id'], '', $_POST['body'])); | |
| header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . "/reddit/post.php?id =". $_GET['id']); | |
| } | |
| ?> | |
| <html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <?php | |
| $dbh = new PDO('mysql:dbname=reddit;host:localhost', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); | |
| if(!empty($_POST)) { | |
| $query = $dbh->prepare('INSERT INTO comments (post, user, body) VALUES (?, ?, ?)'); | |
| $query->execute(array($_GET['id'], '', $_POST['body'])); | |
| header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . "/reddit/post.php?id=id"); | |
| } | |
| ?> | |
| <html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <?php | |
| $dbh = new PDO('mysql:dbname=reddit;host:localhost', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); | |
| if(!empty($_POST)) { | |
| $query = $dbh->prepare('INSERT INTO comments (post, user, body) VALUES (?, ?, ?)'); | |
| $query->execute(array($_GET['id'], '', $_POST['body'])); | |
| header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . "/reddit/post.php"); | |
| } | |
| ?> | |
| <html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <?php | |
| $dbh = new PDO('mysql:dbname=reddit;host:localhost', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); | |
| if(!empty($_POST)) { | |
| $query = $dbh->prepare('INSERT INTO comments (post, user, body) VALUES (?, ?, ?)'); | |
| $query->execute(array($_POST['post'], '', $_POST['body'])); | |
| header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . "/reddit/post.php"); | |
| } | |
| ?> | |
| <html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <?php | |
| $dbh = new PDO('mysql:dbname=reddit;host:localhost', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); | |
| if(!empty($_POST)) { | |
| $query = $dbh->prepare('INSERT INTO comments (post, user, body) VALUES (?, ?, ?)'); | |
| $query->execute(array($_POST['post'], '', $_POST['body'])); | |
| header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . "/reddit/post.php"); | |
| } | |
| ?> | |
| <html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <?php | |
| $dbh = new PDO('mysql:dbname=reddit;host:localhost', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); | |
| if(!empty($_POST)) { | |
| $query = $dbh->prepare('INSERT INTO comments (post, user, body) VALUES (?, ?, ?)'); | |
| $query->execute(array($_POST['post'], '', $_POST['body'])); | |
| header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . "/reddit/post.php"); | |
| } | |
| ?> | |
| <html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <?php | |
| $dbh = new PDO('mysql:dbname=reddit;host:localhost', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); | |
| if(!empty($_POST)) { | |
| $query = $dbh->prepare('INSERT INTO comments (post, user, body) VALUES (?, ?, ?)'); | |
| $query->execute(array($_POST['post'], '', $_POST['body'])); | |
| header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . "/reddit/post.php"); | |
| } | |
| ?> | |
| <html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <?php | |
| $dbh = new PDO('mysql:dbname=reddit;host:localhost', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); | |
| if(!empty($_POST)) { | |
| $query = $dbh->prepare('INSERT INTO comments (post, user, body) VALUES (?, ?, ?)'); | |
| $query->execute(array($_POST['post'], '', $_POST['body'])); | |
| header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . "/reddit/post.php"); | |
| } | |
| ?> | |
| <html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>reddit: the front page of the internet</title> | |
| <link href="reddit.css" rel="stylesheet"/> | |
| <script src="reddit.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <form action="post.php" method="POST"> | |
| <label>Post<input type="text" name="post" /></label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $dbh = new PDO('mysql:dbname=reddit;host:localhost', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); | |
| if(!empty($_POST)) { | |
| $query = $dbh->prepare('INSERT INTO comments (post, user, body) VALUES (?, ?, ?)'); | |
| $query->execute(array($_POST['post'], '', $_POST['body'])); | |
| header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . "/reddit/post.php"); | |
| } | |
| ?> | |
| <?php | |
| if(!empty($_GET)) { |