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
44
Other forums
(sub)screen resize modification doesn't work after ECC 6 EhP 4 installation
Hello,
We have previously extended the size of the custom data tab on PO transaction ME23
Uploading Filetypes and placing them in seperate folders.
Hello,
first post , and asking for help im afraid. Very new to PHP, was making good progress
Can't shake the "Warning: include()" error
I've just uploaded my site to a new server and where I have PHP include tags in my HTML, the browser
How to set pass login name from htaccess to php
When the user logs into my members page via htaccess, I'd like to retain the username so that I can
Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work
Connecion issue
Hi,
For some reason, I keep getting this error when trying to connect:
Warning: mysql_
Upload Code Help
Hi everyone I need some help with a bit of code ive been working with for a while. I am completely s
Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the
chat
hello i'm amir
i need a chat source code in asp.net 2.0 without Ajax.
anybody can help me?
array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.
// foreach