147 switch($task)
148
149 {
150
151 case 'upload':
152 upload($the_file);
153 break;
154 default:
155 form();
156
157 }
Why is it displaying THIS error????
Warning: Undefined variable: task in c:\dev\intranet\news\easy-uploads.php on line 147
It works perfect but it obviosuly doesnt look right with an error msg. i try taking it out, the whole upload doesnt work!
Cheers
Error Message - Uploading Files
Moderators: egami, macek, gesf
- WiZARD
- Moderator
- Posts: 1240
- Joined: Thu Jun 20, 2002 10:14 pm
- Location: Ukraine, Crimea, Simferopol
- Contact:
AaaDee wrote:147 switch($task)
148
149 {
150
151 case 'upload':
152 upload($the_file);
153 break;
154 default:
155 form();
156
157 }
Why is it displaying THIS error????
Warning: Undefined variable: task in c:\dev\intranet\news\easy-uploads.php on line 147
It works perfect but it obviosuly doesnt look right with an error msg. i try taking it out, the whole upload doesnt work!
Cheers
Hi Adam!
I think that you using last version of PHP... Correct?
In a last version of PHP you have a problem with unsetting variables, try to using next:
Code: Select all
if (isset($task)) {$task='upload'}
switch($task)
{
case 'upload':
upload($the_file);
break;
default:
form();
}
And once more, if you no use more variants use if .... else
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";

