PDA

View Full Version : Newblet Error - Help :'(



JoeComins
13-06-2006, 03:48 PM
I hate asking for help in anything, but here goes . . .

I have made a form handeler and form, curtesy of ThyBag.co.uk (L)

I've done something wrong, and now I only get emails with the topics, like Name, COntact Email, Contact Number, without the informationm with them

HELP ME PLEASE

contact.php :

<div class="content">
<div class="header"><div class="icon"></div><img src="images/content.gif" width="89" height="5" alt="Grolsch Content" /></div>
<p align="center"> <form name="form" id="form" method="post" action="formh.php">
<table width="95%" border="0">
<tr>
<td width="31%" valign="top">Name:</td>
<td width="69%"><input name="name" type="text" id="name" size="75" /></td>
</tr>
<tr>
<td valign="top">Email Address: </td>
<td><input name="email" type="text" id="email" size="75" /></td>
</tr>
<tr>
<td valign="top">Contact Number: </td>
<td><input name="number" type="text" id="number" size="75" /></td>
</tr>
<tr>
<td valign="top">Comments:</td>
<td><textarea name="comments" cols="75" rows="4" id="comments"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Contact Grolsch"> &nbsp;</td>
</tr>
</table> </p>
<p>&nbsp;</p>
</div>
formh.php

<?php
if ($_SERVER['REQUEST_METHOD'] != 'GET'){
$name = $_POST['Name'];
$email = $_POST['Email'];
$number = $_POST['Number'];
$comments = $_POST['Comments'];

$messig = "

Name: $name
\n
Email: $email
\n
Message: $number
\n
Ip: $comments

";

mail("comins2005********.co.uk", $subject, $messig);

Header("Location: TY.php");

}
else
{
echo 'ERROR';
}

?>
TY.php

<div class="content">
<div class="header"><div class="icon"></div><img src="images/content.gif" width="89" height="5" alt="Grolsch Content" /></div>
<p align="center">

THANKS

</p>
<p>&nbsp;</p>
</div>
Thanks

Joe Comins

TheTomb
13-06-2006, 03:56 PM
Well on the mail form it says $subject yet you did not define $subject. It probably wont fix the problem but i wanted to point it out.

JoeComins
13-06-2006, 03:57 PM
Thats, but I don think it will make any difference - Ill try it

JoeComins
13-06-2006, 04:01 PM
Worked it out myself - Vyer newblet error

+Rep everyone anyway

Splinter
13-06-2006, 05:47 PM
was it by any chance the fact you called the input name and then used $_POST['Name']; ??

Flauvo
13-06-2006, 05:51 PM
^^ I believe the name was actually asking for the persons name

Splinter
13-06-2006, 05:59 PM
no no shutup..

Flauvo
13-06-2006, 06:09 PM
Wonderfully nice

JoeComins
13-06-2006, 06:29 PM
Splintor - Thats correct - It was - Took me 5 minutes to spot that ''/

Cumec - Splintor meant teh Field name, not the text

;)

Thanks,

Flauvo
14-06-2006, 03:50 PM
lol, im a bit thick, please lay off...:P

Mentor
14-06-2006, 04:25 PM
The great thing about php, all the errors are frustratingly obvious once you find them :)

Jargit
14-06-2006, 04:35 PM
Cool thats funny! bit of spam tho.

Mentor
14-06-2006, 05:12 PM
Cool thats funny! bit of spam tho.
Such an ironic statement, Yet the irony kinda applys to this responce to "/

JoeComins
14-06-2006, 06:10 PM
Erm. Carl - Sorry, about before.

And to whoever I bad repped, Im sorry. Didnt mean to

Want to hide these adverts? Register an account for free!