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

Please help - should be a simple fix.. driving me nuts
Everything seemed to be working fine. I have a table, it alphabetically lists a bunch of cities and

problems with contact forms that are only protected against SQL injections
What could be a potential problem with contact forms that are only protected against SQL injections

Using the $_GET variable to view certain records
Hello,

First let me explain my problem, I have 2 pages the first page pull a list of Guide ti

help with image upload code
Hello,

right now this code I have resizes images and then places them into the uploads folder

how can i make a .gif images for my site
Dear Friends ,

Pls solve my problem , I am starting making new site but i dont know how can i

MySQL query problem
When I try to run the following piece of code, I get this error:
QuoteWarning: mysql_query(): sup

Undefined variable: adHTML
Hello:

While checking my site error logs, I've noticed one repetitive error that fills the lo

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

limitations on array_unique()
Does any one know what/how imitations are applied to array_unique? I have an issue where no matter h

multipart emiail forms
Hi All,

I am new to the boards and I've been working on a form (which is rather massive, imo

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