How to pass a variable from php to a modal?

How to pass a file name from one page to another using php in linux?

  • hi! I m working in linux platform and using php .I want to pass the absolute file path browsed by the client from one page to another using php.I tried with the codes given below but i am not able to do so? the codes are: s.php: <?php session_start(); ?> <html> <body> <form name="fupload" enctype="multipart/form-data" action="s2.php" method="post"> <input type="file" name="picture" /> <input type="submit" value="Submit" /> </form> </body> </html> s2.php: <?php $nn =$_FILES['picture']; echo $nn; ?> o/p : Array. Now how can i display the full path name of the file entered by the client in the previous page in this page..plz help me to get rid f this problem..

  • Answer:

    $_FILES['picture']['name'] should be the original path of the uploaded file $_FILES['picture']['tmp_name'] should be the temporary path to the actual file on the server

sweta agarwal at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.