I have created a form that will email the information in the form with the file attached. I am getting this error
PHP Notice: Undefined index: uploaded_file in C:\Inetpub\wwwroot\STEG2\application.php on line 1844
PHP Notice: Undefined index: uploaded_file in C:\Inetpub\wwwroot\STEG2\application.php on line 1855
PHP Fatal error: Call to undefined function IsInjected() in C:\Inetpub\wwwroot\STEG2\application.php on line 1869
When I run this code byitself in a simpler form it works great.
any help?
here is the file in question.
http://dl.dropbox.com/u/2857979/application.php
Thanks in advance
uploaded_file variable issue?
Moderator: General Moderators
Re: uploaded_file variable issue?
Do you call IsInjected() before you defined it?
Define your functions at the top of the php page or in an external file and include them.
Define your functions at the top of the php page or in an external file and include them.
Re: uploaded_file variable issue?
i've moved some code around and I am still getting this error about uploading the file.
PHP Notice: Undefined index: uploaded_file in C:\Inetpub\wwwroot\STEG2\application.php on line 1024
PHP Notice: Undefined index: uploaded_file in C:\Inetpub\wwwroot\STEG2\application.php on line 1035
Here is the current full doc. http://dl.dropbox.com/u/2857979/application.php
here is the section of code in question
It's just very confusing why PHP thinks this variable is not defined.
This is my code for the input. so I htink i'm doing this correctly.
PHP Notice: Undefined index: uploaded_file in C:\Inetpub\wwwroot\STEG2\application.php on line 1024
PHP Notice: Undefined index: uploaded_file in C:\Inetpub\wwwroot\STEG2\application.php on line 1035
Here is the current full doc. http://dl.dropbox.com/u/2857979/application.php
here is the section of code in question
Code: Select all
$name_of_uploaded_file = basename($_FILES['uploaded_file']['name']); //line 1024
//get the file extension of the file
$type_of_uploaded_file = substr($name_of_uploaded_file,
strrpos($name_of_uploaded_file, '.') + 1);
$size_of_uploaded_file = $_FILES["uploaded_file"]["size"]/1024; //line 1035
Code: Select all
<label for='uploaded_file'>Select A File To Upload:</label> <br> //line 881
<input type="file" name="uploaded_file" id="uploaded_file"> //line 883-
cpetercarter
- Forum Contributor
- Posts: 474
- Joined: Sat Jul 25, 2009 2:00 am
Re: uploaded_file variable issue?
Maybe the file is not uploading. A possible reason is that you have not included an enctype="multipart/form-data" attribute in the form tag.
Re: uploaded_file variable issue?
That helps ALOT!! thank you. I'm able to get the code to work but now i'm having another issue where it's not saving to where I want it to go. i'll post about that issue if I can't figure it out.