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";
Did you know?Explore Trending and Topic pages for more stories like this.
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

LIMIT $start, 10... how to pass last value queried into next page with GET??
Ok I know how to display the first or last 10 results of a query...

$result = mysql_query(&q

if php cookie set, show code...
Hi all.. I need to figure out this little snippet right quick.. seems like it should be easy enough

Add "width" check when upload
Hi!

Can someone add a function that is checking if picture witdh is bigger then 800px whwn up

PHP, jAVASCRIPT setting input values, why isn't it working?
Hi:

I am calling this javascript:
<script language="javascript">

Image DPI
Hi.

I allow users to upload images, the user then is able to adjust several settings for the

IMAGE - SERVER SIDE scripting help...
How to receive pixel data of an image and buid a bitmap file on the server using the HTTP POST metho

DYNPRO_FIELD_CONVERSION
Hi gurus,

I got a dump when I run one of my program. the dump is described below:

Storing user data help?
Hey Guys,

I'm not use if this question is to broad but I can always give you more informatio

Attempt to assign property of non-object in...
I'm having issues with the following function in PHP 5...

function getTreeWithChildre

Problem with shopcart code
Hello, I am having a bit of trouble being able to add a product to my shopcart. My mysql database i

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