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
Connection Timeout
I'm using xmii 12.0
I'm calling a transaction as a web service from a windows application
How to get exact 3 moths post date from today date using javascript
How to get exact 3 moths post date from today date using javascript
Please help
Form errors in an array
I'm processing a form and putting the errors in an array. empty($errors) doesn't seem to do the tric
RTF fomatting to email content
Im trying to sen an email with content is picked up from a rtf-file (file_get_contents('*.rtf'). Mai
Check if another session of the page is running?
I want to keep people from opening multiple tabs, or sessions of my Facebook app. Is it possible to
FROM_UNIXTIME($phpdate);
Hello,
I tried to use this :
$date = FROM_UNIXTIME($phpdate);
ANd I was t
ereg_replace issue
hi there people
i have this code happening with regards to my wamp server. is this something
Socket programming
Hello all,
I have a PHP socket script. GPS trackers connect to this socket. IMEI verification
Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything
a function to check directory depth
I'm working on a php script to upload files in to a set directory.
the user can select to upload