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

Did you know?Explore Trending and Topic pages for more stories like this.
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

Retreiving objects from Sessions
Hi all,

I am getting really frustrated with storing and retreiving objects from a session. Bu

POST into Array problem
Hi Chaps,

I have a repeat region, displaying rows of data: jobid, fromtable, translatorcharge

Error with Font and imagettfbbox
I keep getting an error that says "Warning: imagettfbbox() [function.imagettfbbox]: Could not f

How to generate a random array of integers subject to a certain constraint
I am writing a program that asks the user to enter an integer N and then generates a random array of

Unique Visitor Tracking
Hello. Currently, I run a voting site where voters are tracked by their IP address and can only vote

ASP.NET 2.0 - Enter Key - Default Submit Button
Hi,One of the most annoying things in developing web pages is handling the "Enter key" for form subm

Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<

To change the name of label on SAP screen XK02.
Hi All,

Can one suggest me how to change the label of an input field of a sap standard s

Problem with php's rename function
So, i'm having a problem with the php rename function. Basically my script 'delete_user.php' attempt

Compare user input to flat file data
Help...Am a complete newbie to programming so my code is prolly quite long. Am trying to verify a us

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