Jump to content

How would i code posting the submition form onto my forums?


wtfsmd

Recommended Posts

I am trying to make it so when the user submits their information here:[url=http://overdriveguild.com/apply.php]http://overdriveguild.com/apply.php[/url]

It posts Here: [url=http://overdriveguild.com/phpBB2/index.php?c=5]http://overdriveguild.com/phpBB2/index.php?c=5[/url]

Here is my register1.php code:
[code]<?php
$data = "
<p>
Registrant
<br>Char name - $char_name
<br>Char level - $char_level
<br>Char race - $char_race
<br>Char class - $char_class
<br>Char prof - $char_prof
<br>Char prof lvl - $char_prof_lvl
<br>Char prof2 - $char_prof2
<br>Char prof2 lvl - $char_prof2_lvl
<br>Player name - $player_name
<br>Player age - $player_age
<br>Player gender - $player_gender
<br>Player location - $player_location
<br>Player type - $player_type
<br>Why OverDrive - $why_dl
<br>Good addition - $good_addition
<br>Guild history - $history";

$char_name = $_POST['char_name'];
$char_level = $_POST['char_level'];
$char_race = $_POST['char_race'];
$char_class = $_POST['char_class'];
$char_prof = $_POST['char_prof'];
$char_prof_lvl = $_POST['char_prof_lvl'];
$char_prof2 = $_POST['char_prof2'];
$char_prof2_lvl = $_POST['char_prof2_lvl'];
$player_name = $_POST['player_name'];
$player_age = $_POST['player_age'];
$player_gender = $_POST['player_gender'];
$player_location = $_POST['player_location'];
$player_type = $_POST['player_type'];
$why_dl = $_POST['why_dl'];
$good_addition = $_POST['good_addition'];
$history = $_POST['history'];

$filename = "applicants/$char_class.html";
$fp = fopen("$filename","a");
fwrite($fp, $data);

fclose($fp);
?>[/code]

Thanks!
Link to comment
Share on other sites

:-\ thought so lol.

I am trying to make it so when the user submits their information it makes a post on the forums. under the correct class name e.g. Druid

basically i want $char_class to be posted as a post subject on the forums, or even $char_name a lvl $char_level $char_class as the post subject (which would look like Wtfsmd a lvl 60 Druid).

and [code]<?php
$data = "
<p>
Registrant
<br>Char name - $char_name
<br>Char level - $char_level
<br>Char race - $char_race
<br>Char class - $char_class
<br>Char prof - $char_prof
<br>Char prof lvl - $char_prof_lvl
<br>Char prof2 - $char_prof2
<br>Char prof2 lvl - $char_prof2_lvl
<br>Player name - $player_name
<br>Player age - $player_age
<br>Player gender - $player_gender
<br>Player location - $player_location
<br>Player type - $player_type
<br>Why OverDrive - $why_dl
<br>Good addition - $good_addition
<br>Guild history - $history";
?>
[/code]
to be in the post so like in the post body would be:
Char name - Wtfsmd
Char level - 60
Char race - Human
ect.

instead the way i have it now, is i make it a html file like[code]$filename = "applicants/$char_class.html";
$fp = fopen("$filename","a");
fwrite($fp, $data);

fclose($fp);
?>[/code]
and i [code]<?php include (.'/warlock.php') ?>[/code]
it looks like this [url=http://overdriveguild.com/warlock.php]http://overdriveguild.com/warlock.php[/url]

and the problem with that is it gets way too cluttered up when multiple people post, its simply inefficient.

Do you get what i am trying to do, or did i not explain it good enough ???
Link to comment
Share on other sites

I'd say you're right. I don't see how a script could magically surf to the proper page and category and start/create a new thread. But, you could have the results of the form dumped into all the necessary fields of the 'posts' database quite easily with a simple query than runs when the form is submitted. That is, as long as you have all the necessary info.
Link to comment
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.