<?php
if($objData->getRows('competitions') != 0){
$sql = "";
$comment_topic_id=0;
$file_redirect_name = "";
if(!isset($_REQUEST['compt_id'])){
$last = $objData->getLastId('competitions');
$sql = "select * from competitions where id=$last";
$comment_topic_id = $last;
$file_redirect_name = "competition.php";
}else{
$compt_id = $_REQUEST['compt_id'];
$sql = "select * from competitions where id=$compt_id";
$comment_topic_id = $compt_id;
$file_redirect_name = "competition.php?compt_id=".$compt_id;
}
$res = mysql_query($sql);
$row = @mysql_fetch_assoc($res);
$image = $row['attachments'];
$image_dir = "supervisor/attachments/competition/".$image;
?>
اللي فاهم php يفهمني :(