Guest User

Untitled

a guest
Oct 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1. <?php
  2.  
  3.     session_start();
  4.     include 'config.php';
  5.  
  6.     if(isset($_POST['submit'])){
  7.         $topic_name = $_POST['topic_name'];
  8.         $topic_usernamename = $_POST['topic_username'];
  9.         $topic_input = $_POST['topic_input'];
  10.         "INSERT INTO topics VALUES ($topic_name, $topic_username, $topic_input)";
  11.     }
  12.    
  13.     if($topic_name && $topic_username && $topic_input) {
  14.        
  15.     } else {
  16.         echo 'Please fill in the form to make a post. You have not done so.';
  17.     }
  18.    
  19. ?>
  20.  
  21. <html>
  22.     <head>
  23.     </head>
  24.  
  25.     <body>
  26.         <h2>
  27.             My Fist Forum
  28.         </h2>
  29.             <br>
  30.             <div style="background-color:#CCCCCC; color:#; border-radius:5px;" align=''>
  31.                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='index.php'><b>Board Index<b></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='create_topic.php'><b>New Topic<b></a>
  32.             </div>
  33.             <br>
  34.             <form action="" method="post">
  35.                 <ol>
  36.                     <ul>
  37.                         Topic Name: <br>
  38.                         <input type="text" name="topic_name" /><br>
  39.                     </ul>
  40.                     <ul>
  41.                         Message : <br>
  42.                         <textarea type="text" name="topic_input"></textarea><br>
  43.                     </ul>
  44.                     <ul>
  45.                         <input type="button" name="submit" value="Post" />
  46.                     </li>
  47.                 </ol>
  48.             </form>
  49.     </body>
  50. </html>
Add Comment
Please, Sign In to add comment