D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
probwael
/
public_html
/
Filename :
property_update_listing.php
back
Copy
<?php session_cache_expire(120); ini_set('session.gc_maxlifetime', 7200); @session_start(); include("conn.php"); $em=$_SESSION["em"]; $pid=$conn->real_escape_string(htmlentities($_POST["pid"],ENT_QUOTES)); $icategory=$conn->real_escape_string(htmlentities($_POST["icategory"],ENT_QUOTES)); $ititle=$conn->real_escape_string(htmlentities($_POST["ititle"],ENT_QUOTES)); $descr=$conn->real_escape_string(htmlentities($_POST["descr"],ENT_QUOTES)); $rprice=$conn->real_escape_string(htmlentities($_POST["rprice"],ENT_QUOTES)); $dbeds=$conn->real_escape_string(htmlentities($_POST["dbeds"],ENT_QUOTES)); $dbath=$conn->real_escape_string(htmlentities($_POST["dbath"],ENT_QUOTES)); $dsqm=$conn->real_escape_string(htmlentities($_POST["dsqm"],ENT_QUOTES)); $dgarage=$conn->real_escape_string(htmlentities($_POST["dgarage"],ENT_QUOTES)); $prneg=$conn->real_escape_string(htmlentities($_POST["prneg"],ENT_QUOTES)); $dstate=$conn->real_escape_string(htmlentities($_POST["dstate"],ENT_QUOTES)); $dlocation=$conn->real_escape_string(htmlentities($_POST["dlocation"],ENT_QUOTES)); if($icategory!=='' and $ititle!=='' and $rprice!=='') { mysqli_query($conn, "update _dlistings set icategory='$icategory', subcat='$subcat', ititle='$ititle', descr='$descr', rprice='$rprice', dbeds='$dbeds', dbath='$dbath', dsqm='$dsqm', dgarage='$dgarage', dstate='$dstate', dlocation='$dlocation', prneg='$prneg' where id='$pid' and demail='$em'") or die(mysqli_error($conn)); $_SESSION['msg']='<br><p><font color=green>✔ Your update was successful</font></p>'; header("location: property_listings.php"); } else { $_SESSION['msg']='<br><p><font color=red>One or more required items missing!</font></p>'; header("location: property_listing_edit.php?post={$pid}"); } ?>