I have a form that users input user name, password, and email... all writes to csv fine. My problem is I need to concatenate a a string with a variable and some html code will preserving the html when written to the csv..
I need the csv to be this
username,password,email,user,category,text with http://sub.domain..com/splash/,something,something
here's what i have
<?php
if($_POST['formSubmit'] == "Submit")
$varUserName = $_POST['username'];
$varPW = $_POST['PW'];
$varEmail = $_POST['email'];
{
$fs = fopen("testcsv.csv","a");
fputcsv($fs, array($varUserName,$varPW,$varEmail,"user","title",",category","some text '<a href="http://$varUserName.url.com/splash/>site.com</a>',));
fclose($fs);
exit;
}
?>
and of course I'm getting
Parse error: syntax error, unexpected T_STRING, expecting ')' on line 9