Jump to content

Form to Forum


JukEboX

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531330
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/103776-form-to-forum/#findComment-531973
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.