PDA

View Full Version : Feedback form


Vinney
06-23-2002, 10:06 PM
am trying to create a feedback from for my forum users.


http://forum.peugeot-gti.net/mail.php

i cant get the mailing part to work ... and send all the 'bits' of input.

What is the best way for me to do this ....

can anyone help.


this is wot i have

in my mail.php i have


<?php
error_reporting(7);

require('global.php');
chdir('/home/virtual/site5/fst/var/www/html/mailer/');
require ("config.php") ;

eval("\$header = \"".gettemplate('header')."\";");
eval("\$headinclude = \"".gettemplate('headinclude')."\";");

$title="Peugeot GTi Autosport Forum - Forum Account Validation";
eval("\$page = \"".gettemplate('mailer')."\";");

eval("dooutput(\"".gettemplate('engine')."\");");

?>



in my mailer template i have :


<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
<td width="100%"><img src="{imagesfolder}/vb_bullet.gif" alt="open forum" border="0" align="absmiddle">
<normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> &gt <a href="mail.php?s=$session[sessionhash]">Forum Account Validation</a></b></normalfont></td>
</tr>
</table>
<br>
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="6">
<normalfont color="{categoryfontcolor}"><b>
Forum Account Validation</b></normalfont>
</td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}" colspan="6"><smallfont>
<normalfont color="{categoryfontcolor}">
&nbsp;<p style="margin-top: 0; margin-bottom: 0">If you are a member of the PGAC
you are entitled to unrestricted access to the technical sections of the
forum. </p>
<p style="margin-top: 0; margin-bottom: 0">To obtain full access you must
follow the instructions detailed below:-</p>
<ol>
<li>
<p style="margin-top: 0; margin-bottom: 0">Create a forum account (if you do not have one) and remember your user name
and password <br>
&nbsp;</li>
<li>
<p style="margin-top: 0; margin-bottom: 0">Add your membership number and expiry date to your forum profile. To access
your profile you must click the user cp link at the top of the page. <br>
&nbsp;</li>
<li>
<p style="margin-top: 0; margin-bottom: 0">If you have joined online please follow the above instructions and quote the
last 5 digits of your online receipt and type 'joined online' in the expiry
date. <br>
&nbsp;</li>
<li>
<p style="margin-top: 0; margin-bottom: 0">Members who join online must later return to their profile and add their
membership number / expiry date once received. <br>
&nbsp;</li>
</ol>
<p style="margin-top: 0; margin-bottom: 0">Once you have completed the relevant sections about please complete this
form which informs PGAC management that your account is ready for</p>
<p style="margin-top: 0; margin-bottom: 0">&nbsp;validation. Please note
validation is usually completed within 48 hours.<br>
</p>
</p>
</normalfont>
</td>
</tr>
</table>
</table>
<br>
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="6">
<normalfont color="{categoryfontcolor}"><b>
The Form</b></normalfont>
</td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}" colspan="6"><smallfont>
<normalfont color="{categoryfontcolor}">
<p>
<form method=post action="mailer/mailer.php">
<div align="center">
<center>
<table style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td>Your name:
</td>
<td>
<input type="text" size="30" name="name">
</td>
</tr>
<tr>
<td>M/ship / Full Receipt No</td>
<td>
<input type="text" size="30" name="mship">
</td>
</tr>
<tr>
<td>Expiry Date ( If applicable)</td>
<td>
<input type="text" size="30" name="expiry">
</td>
</tr>
<tr>
<td>Have you just joined Online?</td>
<td>
<select name="online" size="1">
<option>Yes</option>
<option>No</option>
</select>
</td>
</tr>
<tr>
<td>
Forum username</td>
<td>
<input type="text" size="30" name="username" value="$bbuserinfo[username]">
</td>
</tr>
<tr>
<td>
Your email address:
</td>
<td>
<input type="text" size="30" name="email">
</td>
</tr>
<tr>
<td>
<input type="hidden" size="30" name="subject" value="Forum Account Validation">
</tr>
<tr>
<td>
Your message:
</td>
<td>
<textarea name="message" rows=10 cols=50></textarea>
</td>
</tr>
</table>
</center>
</div>
<p align="center">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset"></p>
</form>
</normalfont>
</td>
</tr>



and my mailer.php contains :


<html>
<head>
<title>

<?php
require "config.php" ;
?>
</title>
</head>
<body>


<?php
$send = mail($receiver,$subject,$message,$mship,"From: $email\r\n" .
"Reply-To: $email\r\n" .
"X-Mailer: PHP/" . phpversion());
if ($send=1 )
print "Your email has been send!" ;
else
print "Something went wrong, \"Houston, we've got a problem\" "
?>

</body>
</html>




Now i understand there is probably an easyer way of doing this.

If so ... how :)

Also i'd like it so only logged in forum users can use it.


Please help it would be much appricated.

Logician
06-24-2002, 10:53 AM
editing the report.php may help you better instead of coding it from the begining..

Vinney
06-24-2002, 03:58 PM
Originally posted by Logician
editing the report.php may help you better instead of coding it from the begining..

thanks for the pointer ... but wot i exactly need to do ..


i aint got a clue.