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
send() and recv() parameters confusion
On server Side:
int recv (Socket,Buffer, Length, Flags)
On Client Side:
int send (Soc
Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t
Coding question?
Hey guys, I have a quick question. If I want to make a way for people to pay for health in my game,
Date Question
I'm using the TIMESTAMP() function within mysql to set the date/time for certain events. However, ho
Form File Upload
I've read through tons of resources and tutorials and as far as I can tell, my code is accurate, but
Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called d
Random Number Generation And Probability
Hello, I am working on a function which has to insert data into a SQL table.
we have to suppl
SESSION question
I am building an application , a directory for auctions.
For SEO i made a script which copies a p
mysql VARCHAR acting like INT
Hi, All.
I have a table that contains a varchar(10) column named weird_field. In this column
php multiple action on submit
I have a form which says:
<form enctype='multipart/form-data' method='post' action='pr