undefined variable

A

Anonymous

Guest
when i tried it on my own pc as server; http://localhost/uploading.php, it works...no problem....

when i tried to upload to my website, it comes out some error, don't know why..
need to define nickname????

Notice: Undefined variable: nickname in /home/httpd/vhosts/testing.com/httpdocs/uploading.php on line 32


Code:
<?php
include_once("config.php");
checkLoggedIn("yes");
doCSS();
?>

Code:
print("Hello <b>".$_SESSION["nickname"]."</b><br>\n");


Code:
$uploadfile = $uploaddir . $nickname.$image_types_extensions[$_FILES['userfile']['type']];
 
This is to do with error_reporting in php.ini - it just means that that variable isn't set. Try searching through these forums for information on this.

Andrew
 
it is a notice. not a warning or error.. It is there like bezmond said to let you know a variable is not set.

A workaround would be to use error_reporting(E_ALL ^ E_NOTICE); at the top of the script
 
Back
Top