Blunketts dog Posted February 23, 2009 Share Posted February 23, 2009 Hi there, I am having difficulty using one php file to write to another php file that contains the variable from the first file. As an example, say I have the following code (original.php) to create a new file: <?php $name = Joe touch ("$name.php"); >? Is there a way of writing to the new file (Joe.php) so that Joe.php would be this: <?php echo "hello Joe" ?> but without referencing original.php file. What I am trying to do is loop through a list of names that creates a new php file for each name that is specific to that person. However the original.php may have been deleted before joe.php is run. I hope that makes sense????? Thanks in advance Link to comment https://forums.phpfreaks.com/topic/146500-writing-new-code-using-old-variables/ Share on other sites More sharing options...
revraz Posted February 23, 2009 Share Posted February 23, 2009 Use a Session to store the variable. Link to comment https://forums.phpfreaks.com/topic/146500-writing-new-code-using-old-variables/#findComment-769155 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.