The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> PHP Form to a Forum
Talas
post Mar 18 2007, 07:29 PM
Post #1





Group: Members
Posts: 4
Joined: 18-March 07
Member No.: 2,245



Hello,
I am new to php scripting, but I want to be able to post a new topic (or post, if easier) from my php form that currently emails me to a phpbb forum. Is there any way to do this?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Mar 19 2007, 03:31 AM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



Yes, of course there is. You make the form being submitted a (functional) copy of the form that submits to the forum in the usual way. For example, I am now typing in the text box of a forum submission form. If you copied the text of this form and put it inside a completely different page, the information sent to this forum would be exactly the same.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Talas
post Mar 19 2007, 06:35 PM
Post #3





Group: Members
Posts: 4
Joined: 18-March 07
Member No.: 2,245



how though
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Pattons3rd
post Mar 19 2007, 07:59 PM
Post #4


Newbie
*

Group: Members
Posts: 13
Joined: 19-March 07
Member No.: 2,250



Go to a reply page of the forum and copy the form code.
If you will post the URL I will try and get it for you.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Talas
post Mar 19 2007, 10:57 PM
Post #5





Group: Members
Posts: 4
Joined: 18-March 07
Member No.: 2,245



This is the forum, it currently emails me the info
CODE
<form method="post" action="http://admin.procgl.com/staff/staffapp.php" name="StaffApplication">
    <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER">
    <!-- STEP 2: Put your email address in the 'recipients' value.
                 Note that you also have to allow this email address in the
                 $TARGET_EMAIL setting within formmail.php!
    -->
    <input type="hidden" name="recipients" value="staffapps6SBprocgl.com" />
    <!-- STEP 3: Specify required fields in the 'required' value -->
    <input type="hidden" name="required" value="email:Your email address,realname:Your name" />
    <!-- STEP 4: Put your subject line in the 'subject' value. -->
    <input type="hidden" name="subject" value="ProCGL Staff Application" />

    <table cellspacing="5%">
    <tr>
        <td>
        <p>Please enter your real name:</p>
        </td>
        <td><input type="text" name="realname" />
        </td>
    </tr>
        <tr>
        <td>
        <p>Please enter your game name:</p>
        </td>
        <td><input type="text" name="gamname" />
        </td>
    </tr>
    <tr>
        <td>
        <p>Please enter your email address:</p>
        </td>
        <td><input type="text" name="email" />
        </td>
    </tr>
    <tr>
        <td><p>Who told you we were looking for staff??</p>
        </td>
        <td>
    <select name="staffrecruiter[]" size="5">
     <option value="cory">UnderOath</option>
     <option value="talas">Talas</option>
     <option value="blade">Blade</option>
     <option value="irc">IRC Channel</option>
     <option value="other">Other</option>
    </select>
         </td>
    </tr>
    <tr>
        <td valign="top"><p>What Skills do you have??</p>
        </td>
        <td valign="top">
            <select name="skills[]" multiple size="5">
                <option value="HTML">HTML/PHP/MYSQL Coding</option>
                <option value="LeagueAdmin">League Administration</option>
                <option value="ForumAdmin">Forum Administration</option>
                <option value="LeagueExp">League Experiance</option>
                <option value="Other">Other (Please specify below)</option>
            </select>&nbsp;
            </ br><FONT
color=#c0c0c0>(Select all that apply; use CTRL-click to select)</font>
         </td>
    </tr>
    <tr>
        <td valign="top">
        <p>Why should we accept you?</p>
        </td>
        <td><textarea name="mesg" rows="10" cols="50"></textarea>
        </td>
    </tr>
    <tr>
        <td><input type="submit" value="Apply!" /></td>
        <td></td>
    </tr>
    </table>
</form>


I want it to post the info it would email me to a phpbb forum with the fourm id as 16 and the topic as 5
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Mar 19 2007, 11:10 PM
Post #6


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



What is the URL of the phpbb forum?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Mar 19 2007, 11:11 PM
Post #7


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



Well, replace the code you have shown us with a copy of the submit form for the forum (which you haven't shown us, so we can't guess what it looks like). Then you can customise the appearance to look more like whatever your form now looks like.

Normally, though, a post to a forum does not specify the topic number, which would be assigned automatically. After all, what if there's already a topic number 5? If you want to add distinctly new functionality, you have to look at the forum program, and modify it accordingly. (Or of course pay someone else to do it for you.)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Talas
post Mar 20 2007, 12:12 AM
Post #8





Group: Members
Posts: 4
Joined: 18-March 07
Member No.: 2,245



its the standard posting.php for phpbb, and the link is forum.procgl.com
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Mar 20 2007, 03:47 AM
Post #9


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



Right, then use your browser to download the file http://forum.procgl.com/posting.php and look at the source of this page. Find the <form> tag that starts and </form> that ends the submission form. Clip this out, and paste it into your page, then modify as required.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd May 2024 - 02:37 PM