Re: parse error? how can I print spesific message for all error mesage

From: Date: Mon, 11 Mar 2002 08:41:46 +0000
Subject: Re: parse error? how can I print spesific message for all error mesage
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-87975@lists.php.net to get a copy of this message
<? $dir = $HTTP_GET_VARS["dir"]; $dir = str_replace(" ","/",$dir); $res = $HTTP_GET_VARS["res"]; ?> <title><?=$res;?></title> <img src="<?=$dir;?>/<?=$res;?>.jpg" > </body> My code is running now until if a link comes trough here like "resimgoster.php?dir=main products images&res=pic01" but if you write resimgoster.php to your adress bar without dir and res this script write_> Warning: Undefined index: dir in c:\inetpub\wwwroot\kocak\resimgoster.php on line 1 Warning: Undefined index: res in c:\inetpub\wwwroot\kocak\resimgoster.php on line 3 I want to give a message like "Not Avaiable" if dir and res is not entered!

« previous php.general (#87975) next »