hi there i am setting up a simple html php form. the php is:

<?php
$name = $_POST["name"];
$email = $_POST["email"];
$devices  = $_POST["devices"];
$games = $_POST["games"];
$apps =$_POST["apps"];
$beta = $_POST["beta"];

$stuff = array();
//($stuff, "<html>", "name=", $name, "<br />",
array_push($stuff, "<html>", $name, "<br />", $email, "<br />", $devices, "<br />", $games, "<br />", $apps , "<br />", $beta, "</ html>);
mail ( "[email protected]", "Add me to the mailing listt!!!", $stuff);

and i get

Parse error: syntax error, unexpected T_STRING in /home/nickp/public_html/email/form.php on line 12

any ideas?

share|improve this question
1  
Just take a good look at the syntax highlighting right here on SO... – deceze Dec 20 '12 at 9:12
check the array_push syntax – Rafee Dec 20 '12 at 9:13
1  
These questions make me sad. – Ben Fransen Dec 20 '12 at 9:13
1  
Are you coding in NOTEPAD??? – Salman A Dec 20 '12 at 9:13
Start reading php error while development. Error itself provide enough solution to problem.. :) – Suresh Kamrushi Dec 20 '12 at 9:14
show 2 more comments
feedback

closed as too localized by deceze, Salman A, Glavić, Bill the Lizard Dec 20 '12 at 19:07

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

3 Answers

You forgot closing " to last < /html>

array_push($stuff, "<html>", $name, "<br />", $email, "<br />", $devices, "<br />", $games, "<br />", $apps , "<br />", $beta, "</ html>");
share|improve this answer
feedback

You forgot to close quotes (") in array_push function.

Here is the solution...

array_push($stuff, "<html>", $name, "<br />", $email, "<br />", $devices, "<br />", $games, "<br />", $apps , "<br />", $beta, "</ html>");
mail ( "[email protected]", "Add me to the mailing listt!!!", $stuff);

I recommend you to use some good editor. This will help you to prevent such silly error.

share|improve this answer
feedback
array_push($stuff, "<html>", $name, "<br />", $email, "<br />", $devices, "<br />", $games, "<br />", $apps , "<br />", $beta, "</ html>");
share|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.