$editphoto="select photo_id,path,main from cr_photos where userid='$userid' and main=1"; $editphoto_result=mysql_query($editphoto) or die("Query Failed: ".$editphoto); $maineditphoto=''; if($line=mysql_fetch_array($editphoto_result)){ header("Cache-Control: no-store, no-cache, must-revalidate"); header("Pragma: no-cache"); $maineditphoto =$line['path']; $maineditphotoid =$line['photo_id'];