php problem with form action and build a forum
Posted: Thu Aug 11, 2016 6:20 am
Hello,
I'm beginner in php and I'm trying to build a forum in website.
I build form action and when user press submit it will go to "add_new_topic.php" file and then insert the data to db.
but when I do that it takes my to the index.php and logout from user.
I checked everything and also put attention that I wrote session_start() in each page to remmeber the username
but I didn't get any solution to the problem.
here the 'newtopic.php' ---> I wrote there where is exactly the problem with the form
http://pastebin.com/QRztHjyR
here the 'add_new_topic.php'
http://pastebin.com/hE5WVaH8
thank for help.
I'm beginner in php and I'm trying to build a forum in website.
I build form action and when user press submit it will go to "add_new_topic.php" file and then insert the data to db.
but when I do that it takes my to the index.php and logout from user.
I checked everything and also put attention that I wrote session_start() in each page to remmeber the username
but I didn't get any solution to the problem.
here the 'newtopic.php' ---> I wrote there where is exactly the problem with the form
http://pastebin.com/QRztHjyR
here the 'add_new_topic.php'
http://pastebin.com/hE5WVaH8
thank for help.