Undefined index on my form


Posted on 16th Feb 2014 07:03 pm by admin

ok im getting Undefined index on this line.. print_r($_REQUEST['form']);

below is the full script its form

Code: <?php
ini_set("display_errors", "1");
error_reporting(E_ALL);
echo "<pre>";
echo "POST:";
print_r($_POST);
echo "FILES:";
print_r($_FILES);
echo "</pre>";
if ((($_FILES["file"]["type"] == "application/msword"))
&& ($_FILES["file"]["size"] < 500000))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

if (file_exists("entrys/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"entrys/" . $_FILES["file"]["name"]);
echo "Stored in: " . "entrys/" . $_FILES["file"]["type"];
}
}
}
else
{
echo "Invalid file".$_FILES["file"];
}

print_r($_REQUEST['form']);



?>
and here is my form

why is it displaying this error??

Code: <form action="/include/addfixture.php" method="post" onsubmit="return AIM.submit(this, {'onStart' : startCallback, 'onComplete' : completeCallback})"enctype="multipart/form-data">
<div><label>Name:</label> <input type="text" name="name" /></div>
<div><label>File:</label> <input type="file" name="file" /></div>
<div><input type="submit" name="form"value="SUBMIT" /></div>
</form>

No comments posted yet

Your Answer:

Login to answer
69 Like 44 Dislike
Previous forums Next forums
Other forums

Insert numbers from Barcode scanner into online php page
I have a real big problem, Here is what I'm trying to do. I have a Intermec CN3 handheld computer th

show random images
hey guys

can someone please suggest a way in which the following code can be edited so it onl

Need help with cin setw
I made a program here is my code:

#include
#include
#i

Character increment
Hi,

I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc..

Is it possible to put an entire 500-page book in a database with PHP?
I am working on an intranet and I was wondering if its possible to code php with mysql to enter a fu

Custom CMS
This is a big custom CMS script I'd like to develop and would like some help atleast figuring out wh

getting a website's source code as a variable? How?
Hey guys, is there any way for me to get the source code of a website as a variable for me to work w

Code doesn't print what i wanted it too. Please help!
Hi there,

I wrote this code to mae it so that in the form before it that the user said their

retrieving policy name inside the function called by this particular policy
Hi there,

I've playing around with dbms_rls package, trying to set up some security repo

Having a problem get the selected item from a drop down menu
I have been looking at this for days now.

I have a drop down menu that get it's values from a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash