warrenk Posted February 12, 2007 Share Posted February 12, 2007 I am trying to determine if the Upload button is pressed. When it is pressed, I tried to display a message. The message never displays. How can I determine if the Upload button is pressed? echo("<form enctype='multipart/form-data' action='' method='POST'>"); echo("<input type='hidden' name='MAX_FILE_SIZE' value='100000' />"); echo("Choose a file to upload: <input name='uploadedfile' type='file' /><br />"); echo("<input type='submit' name='Upload' value='Upload'>"); echo("</form>"); if(isset($Upload)){ echo "button pressed";} Quote Link to comment Share on other sites More sharing options...
Balmung-San Posted February 12, 2007 Share Posted February 12, 2007 You'd have to submit your form somewhere. The page that it is submitted to will know if it's pressed or not. As well, I wouldn't suggest using just $Upload, as that assumes register_globals is on. In most cases it won't be, so you'll need to use $_POST['Upload']. Quote Link to comment Share on other sites More sharing options...
warrenk Posted February 12, 2007 Author Share Posted February 12, 2007 Thanks Balmung...the $_Post['Upload'] works! Appreciate your help! Warren Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.