Contents of variable not echoing


Posted on 16th Feb 2014 07:03 pm by admin

Hey guys, hopefully this is an easy one...

In this line, the variables are not echoing out. The script runs without error though.
Code: [Select]echo "Name: $name | E-mail: $email | Comments: $comments";
So I tried surround them with "" like so:
Code: [Select]echo "Name: "$name" | E-mail: "$email" | Comments: "$comments"";
I get the error:
Code: [Select]Parse error: syntax error, unexpected T_VARIABLE in /var/www/vhosts/mputers.co.nz/httpdocs/process.php on line 13
Anyone know the correct way to write that line? Variables definitely contain values.

No comments posted yet

Your Answer:

Login to answer
169 Like 27 Dislike
Previous forums Next forums
Other forums

Entering Data Problem
Code: $result = mysql_query("SELECT * FROM flights");
while ($row = mysql_fetch_array($

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Website Direction...
I recently used this code to try and make it so the page loads as http://www.domain.com/ when you ty

Get dump of MySQL DB from Live Site
I'm after an easy, but secure way of generating and importing a MySQL dump from a remote server.

Return X values where an ID number doesnt matter
Well as for subject heading, thats the best i could think of.

Currently im having a problem w

Problem with a select distinct
I have a problema with a select distinct, I have the next sql:

select distinct a,b,c,d fr

How to make a input/output field with multiple lines
Hello.
I put a input/output field on the screen but I could not change height of it. I need to

LSB (PHP 5.3) problem with static value!
hello,

i'm having a problem. static::$text variable gets lost at some point. can someone plea

Display certain image depending on time of year
Hi, I am new to these forums and would really appreciate some advice on a piece of coding I have don

Check premium expire
Hi,

I am making a simple file hosting site and want to check if users premium subscriptions h

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash