dmikester1 Posted September 28, 2007 Share Posted September 28, 2007 I am working on a file directory listing and file editor. I have a index.php file which lists directory contents and a "create new file" link which pops up a new window to create a file within the working directory. I am popping up that new window with javascript and I'm not sure how to pass the variable containing the working directory as I do that. Here is the line of JS code that opens the new window: win = window.open('MikesFileEditor.php','name','height=650, width=700,toolbar=no,directories=no, status=no, menubar=no,scrollbars=no,resizable=no'); Any help would be greatly appreciated. Thanks! Mike P.S. I just had an idea that I could set the filedir variable to getcwd(); in MikesFileEditor.php, but since MikesFileEditor.php is in the home directory, that won't work either. Link to comment https://forums.phpfreaks.com/topic/71114-solved-passing-a-php-variable-when-opening-new-page/ Share on other sites More sharing options...
mcmuney Posted September 29, 2007 Share Posted September 29, 2007 Try adding "value=<?=$value_here?>" at the end of the file link, so it would look like "MikesFileEditor.php?value=<?=$value_here?>" value is the id that MikesFileEditor.php would pull, using $_GET from the url and $value_here would be the content. Link to comment https://forums.phpfreaks.com/topic/71114-solved-passing-a-php-variable-when-opening-new-page/#findComment-357615 Share on other sites More sharing options...
freakstyle Posted September 29, 2007 Share Posted September 29, 2007 this sounds like it was solved. dmikester1? is your question solved? if so please update the post status Link to comment https://forums.phpfreaks.com/topic/71114-solved-passing-a-php-variable-when-opening-new-page/#findComment-357619 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.