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

Can I use a loop
Hi buddies!

Once again with my doubts here.

Right now I am using this sql stat

MSSQL/PHP
I am tryint to setup a webapplication developed in PHP, Apache2.0 and SQLServer2000 as backend which

PHP hyperlinks generator - HELP plz
Hi

I need some help to get this done using php:


1 - I have few hyperlinks say 500

Problem with HTTP Caching...?
Hi there, im trying to implement caching. But it doesn't always work.
I post it here because ther

How to restrict the display of report variants
Hello All,

I want t know how to restrict the display of report variants.
I mean, whe

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

Getting Subdomain Name With PHP?
I want to grab the subdomain name with PHP so I can generate database queries.

for example my

how to use two buttons with php
hi i have one form. there are three fields which are to be filled by the user. and then there are tw

help me, how to find text on an external html site using PHP
Would anyone know how to search an external html file for a work or phrase ?

I was thinking s

matching numbers inside ( )
I know I can match numbers by just [0-9]+, so I thought matching numbers inside ( ) would be somethi

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