Page 1 of 1

Help with a variable! Can't figure it out!

Posted: Fri Mar 06, 2009 4:48 pm
by mi3x
Ok so I need a name of a file to be called like this (SMITH-FR3242SDSMI.html)
SMITH stands for the first name - $Lname
FR3242SDSMI for the Transaction ID - $Tid

How can I define this variable? Because it won't work with the "-" which unifies the two. Can somebody help?

Code: Select all

$file_name=$_POST["Lname-Tid"];
Thanks! :banghead:

Re: Help with a variable! Can't figure it out!

Posted: Fri Mar 06, 2009 4:59 pm
by Benjamin

Code: Select all

 
$file_name = "{$_POST['Lname']}-{$_POST['Tid']}";
 

Re: Help with a variable! Can't figure it out!

Posted: Fri Mar 06, 2009 5:03 pm
by mi3x
Thanks for the quick reply, but I need it with a "-"separating them. Now it gives me SMITHFR3242SMI.html and I want SMITH-FR3242SMI.html

Can this be done? Thanks again! ;D

Re: Help with a variable! Can't figure it out!

Posted: Fri Mar 06, 2009 5:05 pm
by mi3x
astions wrote:

Code: Select all

 
$file_name = "{$_POST['Lname']}-{$_POST['Tid']}";
 

:drunk: Voilaaa! Thanks a bunch!