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

If statement help please.
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and th

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

Dynamic links in an include file
I am working on a small piece of code that counts records from a database and displays the result to

list files from folder, only one for each date
I have many files in a folder and wish to only list one of each date

these are the file names

Need help in Generating Combinations
Need help generating all possible combination of names in an array

Lets say i have the follow

Reading Most Recent CSV File in Directory
I thought I had wrapped this project up, but found out that the program I use to FTP a csv file to m

Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil

How would I protect......
I have a from, actually, a good amount of forms. How can I make it so you can't type the characters:

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

How to add an image/C++ OpenGL?
Hi,

I have been trying to look online for this and, so far, I haven't found anything usef

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