I'm making a forum for a game I play. I have almost everything done but the forum part. I cant figure out how to post the text the user inputted to the screen.
Heres the code I have so far:
<?php
include "config-post.php";
$titlex = $_POST['title'];
$areax = $_POST['area'];
$bodyx = $_POST['body'];
$title = strip_tags($titlex);
$area = strip_tags($areax);
$body = strip_tags($bodyx);
$time = date('d/m/y h:i:s');
if($area == discussion){
$query = "INSERT INTO discussion(title, body, time) VALUES ($title, $body, $time)";
$result = mysql_query($query);
if($result){
header("Location: discussion.php");
}
}
if($area == suggestions){
$query2 = "INSERT INTO suggestions(title, body, time) VALUES ($title, $body, $time)";
$result2 = mysql_query($query2);
if($result2){
header("Location: suggestions.php");
}
}
if($area == tips){
$query3 = "INSERT INTO tips(title, body, time) VALUES ($title, $body, $time)";
$result3 = mysql_query($query3);
if($result3){
header("Location: tips.php");
}
}
if($area == bugs){
$query4 = "INSERT INTO bugs(title, body, time) VALUES ($title, $body, $time)";
$result4 = mysql_query($query4);
if($result4){
header("Location: bugs.php");
}
}
if($area == war_discussion){
$query5 = "INSERT INTO war discussion(title, body, time) VALUES ($title, $body, $time)";
$result5 = mysql_query($query5);
if($result){
header("Location: war.php");
}
}
?>