ok i have a variable, but if it doesnt work i want it to die, like:
$userUpload = $_SESSION["userName"]; or die"Doesnt Work"
whats the code for that!
i suppose you're after this:
mysql_query($text) or die(mysql_error()); // you can use this with any code that will return a success // in your case, you could try: $userUpload = $_SESSION["userName"] or die("Doesnt Work");
What do you mean if it "doesn't work" ? You mean, if the username is blank in the session?
if(empty($_SESSION['userName'])) die('Doesn\'t work'); else $userUpload = $_SESSION['userName'];