How do I copy data from one file to another? from $_SESSION['fname'] to
"fname"
datafile.php has
fname: $_SESSION['fname'];
lname: $_SESSION['lname'];
I would like to automatically copy the data to
second.js
var fname = "fname";
var lname = "lname";
to be used in JavaScript.
I am familiar with
$contents = file_get_conten ts($filename);
and I know how to copy files but not data inside of the file.
Thanks for the help.
Ken
"fname"
datafile.php has
fname: $_SESSION['fname'];
lname: $_SESSION['lname'];
I would like to automatically copy the data to
second.js
var fname = "fname";
var lname = "lname";
to be used in JavaScript.
I am familiar with
$contents = file_get_conten ts($filename);
and I know how to copy files but not data inside of the file.
Thanks for the help.
Ken
Comment