PDA

View Full Version : Help with some php



DUB
09-02-2008, 07:06 PM
I am fairly new with php and im just basically creating simple scripts now and then. Anyway i can't seem to fix this syntax error, it's most likely a simple fix but oh well :).

I am making a comment system, a basic one where the user enter's his/her name & their message and displays it.

Heres the line which causes an error:

$outputstring = "Name: " ,$name, "<br> Comment:<br> " ,$message, "<br>";

and this is the error i receive:

Parse error: syntax error, unexpected ','

Thanks alot

DeejayMachoo$
09-02-2008, 07:35 PM
$outputstring = "Name: " . $name ."<br> Comment:<br> " . $message ."<br>";

DUB
09-02-2008, 07:51 PM
thanks :)

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