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!
:-\ 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 ???
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.

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.