PHP Beginner: How to pass PHP variable from one PHP code segment to another ?

Posted by Misha Moroshko on Stack Overflow See other posts from Stack Overflow or by Misha Moroshko
Published on 2010-06-06T13:36:46Z Indexed on 2010/06/06 13:42 UTC
Read the original article Hit count: 240

Filed under:
|
|
|
|

I have index.php which uploads a file to server and sets several PHP variables (like $target_folder_and_file_name).

index.php also has the following line (it was originally index.html):

<script language="JavaScript" src="main.js.php"></script>

After index.php returned to the browser, the browsers asks for main.js.php from the server (right?).

Can I access somehow $target_folder_and_file_name from the PHP code in main.js.php ?

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript