PDA

View Full Version : PHP Help



additional
27-04-2006, 08:47 AM
Hey, I need help with this form. I get this error when I go to submit.


Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/habiz/public_html/en/postit.php on line 35

This is the code


<?php
if ($_SERVER['REQUEST_METHOD'] != 'GET'){
$habbo = $_POST['habbo'];
$djname = $_POST['djname'];
$email = $_POST['email'];
$djpuser = $_POST['djpuser'];
$djppass = $_POST['djppass'];
$wudj = $_POST['wudj'];
$linkies = $_POST['linkies'];
$why = $_POST['why'];
$special = $_POST['special'];
$anything = $_POST['anything'];
$ip = $_POST['ip'];
$messig = "
Habbo Name: $habbo
DJ Name: $djname
Email: $email
DJ Panel User: $djpuser
DJ Panel Pass: $djppass
Experience: $wudj
Link to Clip: $linkies
Why choose you: $why
Special Abilities: $special
Anything we should know: $anything
This form was made by PogoMonkey
";
$subject = $habbo 's Job Application;
mail([email protected], $subject, $messig);
Header("Location: sent.php");
}
else
{
echo 'ERROR';
}
?>

Anybody care to explain where I have went wrong?

Thanks.

Tomm
27-04-2006, 02:49 PM
Ok change: $subject = $habbo 's Job Application;

To:


$subject = $habbos . " 's Job Application";

additional
27-04-2006, 03:02 PM
Now I get this :

Parse error: parse error, unexpected '@' in /home/habiz/public_html/en/postit.php on line 28


<?php
if ($_SERVER['REQUEST_METHOD'] != 'GET'){
$habbo = $_POST['habbo'];
$djname = $_POST['djname'];
$email = $_POST['email'];
$djpuser = $_POST['djpuser'];
$djppass = $_POST['djppass'];
$wudj = $_POST['wudj'];
$linkies = $_POST['linkies'];
$why = $_POST['why'];
$special = $_POST['special'];
$anything = $_POST['anything'];
$ip = $_POST['ip'];
$messig = "
Habbo Name: $habbo
DJ Name: $djname
Email: $email
DJ Panel User: $djpuser
DJ Panel Pass: $djppass
Experience: $wudj
Link to Clip: $linkies
Why choose you: $why
Special Abilities: $special
Anything we should know: $anything
This form was made by PogoMonkey
";
$subject = $habbos . " 's Job Application";
mail([email protected], $subject, $messig);
Header("Location: sent.php");
}
else
{
echo 'ERROR';
}
?>

ADAM:
27-04-2006, 03:12 PM
You do know it has 'mail([email protected], $subject, $messig);' in it ?

additional
27-04-2006, 03:18 PM
and thats wrong? I am very inexperinced at PHP.

My mate made it, and its not working. Anybody mind fixing it up than?

Tomm
27-04-2006, 03:25 PM
You need to change: mail([email protected], $subject, $messig);

to:

mail("[email protected]", $subject, $messig);

ADAM:
27-04-2006, 03:26 PM
Hey

Why dont you use the one of ThyBag ?

Link: http://thybag.co.uk/index.php?p=Tutorials&ind=2

- Adam

additional
27-04-2006, 03:35 PM
Thanks, form is fixed :P +rep.

Sygon.
27-04-2006, 03:54 PM
:D
$subject = "$habbo 's Job Application";

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