real_escape_string($_GET['report']); mysqli_query($conn, "UPDATE `adboard_ads` SET reported = reported + 1 WHERE `ad_id` = '$ad_id'"); header('Location: advert.php?ad_id='.$ad_id.'&error=5'); } if(isset($_GET['ad_id'])){ $ad_id = $conn->real_escape_string($_GET['ad_id']); $getINFO = mysqli_fetch_assoc(mysqli_query($conn, "SELECT * FROM `adboard_ads` WHERE `ad_id` = '$ad_id'")); $ad_title = $getINFO['ad_title']; $owner_id = $getINFO['owner_id']; $ad_img_link = $getINFO['ad_img_link']; $ad_price = $getINFO['ad_price']; $ad_desc = $getINFO['ad_desc']; $ad_cat = $getINFO['ad_cat']; $ad_sub_cat = $getINFO['ad_sub_cat']; $posted_date = $getINFO['posted_date']; $views = $getINFO['views']; $ad_city = $getINFO['ad_city']; $ad_location = $getINFO['ad_location']; $files = glob($ad_img_link . '/*.*'); $file1 = array_rand($files); $random_pic = $files[$file1]; $getOWNER = mysqli_fetch_assoc(mysqli_query($conn, "SELECT * FROM `adboard_users` WHERE `user_id` = '$owner_id'")); $email_address = $getOWNER['email_address']; $first_name = $getOWNER['first_name']; $contact_number = $getOWNER['contact_number']; } else { header('Location: index.php'); } if(isset($_GET['error'])){ $error = $_GET['error']; } ?> Advert Boards | Local Classified Adverts Online Noticeboard

Description