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

Strange PHP/mySQL error ... am I just tired?
Code: <?

## CONNECT TO DB FUNCTION!
function ConnectTo($db2con)
{
$hostNam

Not capturing all the information we require in the form.......
Hi Guys,

I was wondering if you would share some more of your knowledge today, I'm hoping it

Referential Integrity problem when inserting into 2 tables at same time
Hello Everyone,

Im relativity new to PHP and MySQL and i have come up against a problem. i h

Restricted access to sub-folder in iis6 doesn't work?
Basically I'm trying to add restriction to sub-folder (which contains pdf) in web.config for iis6 as

php + mysql count consecutive data
I have a database of values and I want to work out how to display them if the values match a consecu

Save data in input fields when they press "BACK BUTTON"
Hi, this is html form: And let's say they get a error "Please enter ur title must be more then

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

Problem with creating FI documents
Hi, Experts!

when i create Fi doc. with standart transaction, i ve been had such problem

Oracle Connectivity
Hi Every One,

Can we access SAP from oracle database.If it possible then please spec

Else statement screws up all css
Does anyone know what goes wrong in the process with this php code?
This code seems to be causing

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