Quick question (hopefully)
I am saving a form as a pdf using php and would like to save the $filename as something like:
/New_Form_[user].pdf
(where [user] is $POST['forename']+$POST['surname'])
Is this possible? if so how?
my current code:
$filename = "HTC_619 New User.pdf";
The "New User" bit i want auto populated from Firstname and Surname from the form.
so:
$filename = "HTC_619_$POST['Forename']_$POST['Surname']
Thanks
Phil
yes you can do it like
header("Content-Disposition: attachment; filename=\"$filename\"")
$filename = "HTC_619". $username."_".$surname.".pdf";
pass the post first name and last name in $filename variable
$name=$_POST['forename']+$_POST['surname'];
$filename="htc_619"."_".$name.".pdf";