Jump to content

Recommended Posts

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.

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.