JukEboX Posted May 1, 2008 Share Posted May 1, 2008 I have forums and a form. When Someone submits their information I would the system to post the information to my MySQL server as well as create a thread in my forums. Please do not ask why I am doing this. I just would llike to know how to do it. Just tell me where to start. THanks. Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/ Share on other sites More sharing options...
JD* Posted May 1, 2008 Share Posted May 1, 2008 Sounds like you need to look into a perl script that can emulate the behavior of a user agent. Start at google looking for WWW::Mechanize Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531300 Share on other sites More sharing options...
Fadion Posted May 1, 2008 Share Posted May 1, 2008 Sounds like you need to look into a perl script that can emulate the behavior of a user agent. Start at google looking for WWW::Mechanize It makes no sense! He just wants to add info to the db. @JukEboX. First start by telling if it is a custom forum or not. I doubt it being custom as then ud know how to add info to a db . So being it non-custom, it has its own database structure. Look which table holds the threads and insert the form data to it. It would look like: <?php mysql_connect('db_server', 'username', 'password'); mysql_select_db('forum'); if(isset($_POST['info'])){ //see if the form is submitted $info = $_POST['info']; $results = mysql_query("INSERT INTO threads (title, info) VALUES ('my thread', '$info')"); } ?> That is the basic way of adding a row into a table. Usually its not as simple as that, as u may have several other fields, like thread starter (user), category/forum, icon, sticky etc. That "Please do not ask why I am doing this" makes me think u arent thinking of posting at your forums (as it actually doesnt make too much sense, other then being educational). If its so, then dont even try the above script as it wont work. Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531330 Share on other sites More sharing options...
JukEboX Posted May 2, 2008 Author Share Posted May 2, 2008 Ok as for the forums. I am using a basic installation of phpBB3. Ok your right. I run a recruitment site for gamers. My forums are at http://cxfa.net/forums. I am still a little puzzled. I know to insert data. I am not sure where to look with my forums. Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531382 Share on other sites More sharing options...
JukEboX Posted May 2, 2008 Author Share Posted May 2, 2008 Bump Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531752 Share on other sites More sharing options...
ohdang888 Posted May 2, 2008 Share Posted May 2, 2008 you've got to explain it better you: I am not sure where to look with my forums. huh???? Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531781 Share on other sites More sharing options...
discomatt Posted May 2, 2008 Share Posted May 2, 2008 Why not just use your forum's user management for your record-holding? Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531786 Share on other sites More sharing options...
Crew-Portal Posted May 2, 2008 Share Posted May 2, 2008 why not simply open up your forum posting script in "Dreamweaver" or whatever program you use and see how its done. Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531929 Share on other sites More sharing options...
benphp Posted May 2, 2008 Share Posted May 2, 2008 You'll need to track down the SQL in the forum php and add your own INSERT statement. Finding stuff in phpBB is tricky - it's a maze. You might want to post on their forum about this. Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531933 Share on other sites More sharing options...
cunoodle2 Posted May 2, 2008 Share Posted May 2, 2008 Or hire a programmer to do it for you. Look at their code, learn form it and then do everything else yourself in the future on your own. Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531966 Share on other sites More sharing options...
DarkWater Posted May 2, 2008 Share Posted May 2, 2008 A few things: 1) phpBB is a very elaborate forum system (I love it) and it should just work... 2) You never really told us what you needed. At all. 3) You should really learn PHP if you want to customize a phpBB board. We're helping you for free, but our expertise can only get you so far. Quote Link to comment https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531973 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.