Guest User

Untitled

a guest
Feb 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. if ($_POST['threadpost'])
  2. {
  3. $threadtitle = $_POST['title'];
  4. $threadtext = $_POST['text'];
  5. $avatar = $_POST['avatar'];
  6. mysql_query("INSERT INTO threads (title, authorid, author, text) VALUES ($threadtitle, $userid, $username, $threadtext)");
  7. echo "Your thread has been posted!";
  8. }
  9. else
  10. {
  11. echo "
  12. <form method='post' id='threadpost' action='./postthread.php'>
  13. <h1>Title</h1>
  14. <input type='text' name='title' style='width: 80%' maxlength='100' name='name'>
  15. <h1>Content</h1>
  16. <textarea maxlength='50000' name='text' rows='15' cols='80' style='width: 80%'>
  17. Thread
  18. </textarea>
  19. <br />
  20. <input type='submit' name='postthread' value='Post Thread' />
  21. </form>";
  22. }
Add Comment
Please, Sign In to add comment