Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include 'config.php';
- if(isset($_POST['submit'])){
- $topic_name = $_POST['topic_name'];
- $topic_usernamename = $_POST['topic_username'];
- $topic_input = $_POST['topic_input'];
- "INSERT INTO topics VALUES ($topic_name, $topic_username, $topic_input)";
- }
- if($topic_name && $topic_username && $topic_input) {
- } else {
- echo 'Please fill in the form to make a post. You have not done so.';
- }
- ?>
- <html>
- <head>
- </head>
- <body>
- <h2>
- My Fist Forum
- </h2>
- <br>
- <div style="background-color:#CCCCCC; color:#; border-radius:5px;" align=''>
- <a href='index.php'><b>Board Index<b></a> <a href='create_topic.php'><b>New Topic<b></a>
- </div>
- <br>
- <form action="" method="post">
- <ol>
- <ul>
- Topic Name: <br>
- <input type="text" name="topic_name" /><br>
- </ul>
- <ul>
- Message : <br>
- <textarea type="text" name="topic_input"></textarea><br>
- </ul>
- <ul>
- <input type="button" name="submit" value="Post" />
- </li>
- </ol>
- </form>
- </body>
- </html>
Add Comment
Please, Sign In to add comment