if (isset($_COOKIE['msg']) && $_COOKIE['msg'] != '') { if (get_magic_quotes_gpc()) $msg = stripslashes($_COOKIE['msg']); else $msg = $_COOKIE['msg']; setcookie('msg', ''); } ?> <!-- Beginning of main page --> <html><head> <title>IFRAME Async file uploader example</title> </head> <body> <?php if (isset($msg)) echo '<p style="font-weight: bold;">'.$msg.'</p>'; ?> <h1>Upload file:</h1> <p>File will begin to upload just after selection. </p> <p>You may write file description, while you file is being uploaded.</p>
<form action="<?=$PHP_SELF?>" target="upload_iframe" method="post" enctype="multipart/form-data"> <input type="hidden" name="fileframe" value="true"> <!-- Target of the form is set to hidden iframe --> <!-- From will send its post data to fileframe section of this PHP script (see above) -->
<label for="file">text file uploader:</label><br> <!-- JavaScript is called by OnChange attribute -->