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

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

PHP5/Zend 2.0 - Resources
PHP5 Snapshots
http://snaps.php.net/

ZEND 2.0 Feature Overview and Design (PDF File

Delete Client 066 Earlywatch
Hi all,

in former times client earlywatch was required for SAPs remote access to SAP inst

Count of reciepients in php mailer
How can i sent a mail to large no of reciepients say 10,00,00 Using PHP MAILER

Logic question
im wondering what's the best method to do the above list:

it is for alliance @ MMORPG game

FILTER_CALLBACK -- Files?
Hi All,

I'm using the php filter functions to validate my form data. For custom filters, I'm

phph within href not showing php if change ? to &
Code: [Select]<a href="<?php echo $puser; ?>?m=<?php=(($m-1)&l

Transport data between itab and textfield on ALV event
Hallo,

I have a ALV Grid ( cl_gui_alv_grid ) and I also have hotspot click event with a h

PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo tho

Dynamic memory problem
Hey,

At the beginning of my code, I have this line:

Shape* gShape = 0;

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