rebeccap Posted April 17, 2006 Share Posted April 17, 2006 I downloaded a form that uses php to process a file on a server with a 5 digit code (ie 12345.php is the new file name). I'm wondering if I can use the variables stored from the form to the file and reopen the form for editing the new file. I guess I can use another form to tell it what 5 digit code to use, but can you pass a variable from file to file with php without a database (both hosted databases are used.)Thanks,Rebecca Link to comment https://forums.phpfreaks.com/topic/7621-calling-variables-from-a-file/ Share on other sites More sharing options...
poirot Posted April 17, 2006 Share Posted April 17, 2006 I am not sure if I got what you want... But let's say you have a "database file", and the values are stored as a serialized array...So you can use something like this:[code]$data = unserialize(file_get_contents('file_name_here.php');echo '<input type="text" name="name" value="' . $data['name'] . '">';echo '<input type="text" name="email" value="' . $data['email'] . '">';[/code] Link to comment https://forums.phpfreaks.com/topic/7621-calling-variables-from-a-file/#findComment-27911 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.