Basically all i have done is just modified some code and added an area section.
The form is allready submitting other things like location price etc.
And i have simply added a field in db called area and changes to the page, everything else submits appart from the area.
Add properties.php (this has form which gets processed on addimages2.php
addProperties.php
Code:
<?php
include('../lib/scripts/php/functions.php');
$page_title='Add Properties';
$page_id_top = 'properties';
$page_id = 'add';
if(isset($_GET['error_code']))
{
$error_id = 'Highlighted fields are required';
$highlight = true;
}
include('../lib/includes/header.php');
$ownerSQL = 'SELECT * FROM owners';
$ownerResults = $db->query($ownerSQL);
$property_id ='';
$costal ='';
$garden ='';
$openFire ='';
$pets ='';
$disabled ='';
$groundFloor ='';
$shortBreaks ='';
$baby ='';
$data ='';
if (empty($_GET['get_owner']))
{
$_GET['get_owner'] = '';
}
if (empty($_GET['get_grading']))
{
$_GET['get_grading'] = '';
}
if (empty($_GET['get_maxGuests']))
{
$_GET['get_maxGuests'] = '';
}
if (empty($_GET['get_bedrooms']))
{
$_GET['get_bedrooms'] = '';
}
if (empty($_GET['get_parking']))
{
$_GET['get_parking'] = '';
}
if (empty($_GET['get_petsAmount']))
{
$_GET['get_petsAmount'] = '';
}
if (empty($_GET['get_status']))
{
$_GET['get_status'] = '';
}
if (empty($_GET['get_changeOver']))
{
$_GET['get_changeOver'] = '';
}
if (empty($_GET['get_linen']))
{
$_GET['get_linen'] = '';
}
if (empty($_GET['get_special1']))
{
$_GET['get_special1'] = '';
}
if (empty($_GET['get_special2']))
{
$_GET['get_special2'] = '';
}
if (empty($_GET['get_access']))
{
$_GET['get_access'] = '';
}
if (empty($_GET['get_area']))
{
$_GET['get_area'] = '';
}
if(isset($_GET['id']))
{
$property_id = $_GET['id'];
$propertiesSQL = "SELECT * FROM properties WHERE id = '$property_id'";
$data = $db->query($propertiesSQL);
$_GET['get_owner'] = $data[0]['owner'];
$_GET['get_grading'] = $data[0]['grading'];
$_GET['get_maxGuests'] = $data[0]['maxGuests'];
$_GET['get_bedrooms'] = $data[0]['bedrooms'];
$_GET['get_parking'] = $data[0]['parking'];
$_GET['get_petsAmount'] = $data[0]['petsAmount'];
$_GET['get_status'] = $data[0]['status'];
$_GET['get_changeOver'] = $data[0]['changeOver'];
$_GET['get_linen'] = $data[0]['linen'];
$_GET['get_special1'] = $data[0]['special1'];
$_GET['get_special2'] = $data[0]['special2'];
$_GET['get_access'] = $data[0]['access'];
/*New area*/
$_GET['get_area'] = $data[0]['area'];
}
if (empty($data))
{
if (!empty($_GET['get_owner']))
{
$data[0]['owner'] = $_GET['get_owner'];
}
else
{
$data[0]['owner'] = '';
}
if (!empty($_GET['get_propertyName']))
{
$data[0]['propertyName'] = $_GET['get_propertyName'];
}
else
{
$data[0]['propertyName'] = '';
}
if (!empty($_GET['get_changeOver']))
{
$data[0]['changeOver'] = $_GET['get_changeOver'];
}
else
{
$data[0]['changeOver'] = '';
}
if (!empty($_GET['get_linen']))
{
$data[0]['linen'] = $_GET['get_linen'];
}
else
{
$data[0]['linen'] = '';
}
if (!empty($_GET['get_special1']))
{
$data[0]['special1'] = $_GET['get_special1'];
}
else
{
$data[0]['special1'] = '';
}
if (!empty($_GET['get_special2']))
{
$data[0]['special2'] = $_GET['get_special2'];
}
else
{
$data[0]['special2'] = '';
}
if (!empty($_GET['get_access']))
{
$data[0]['access'] = $_GET['get_access'];
}
else
{
$data[0]['access'] = '';
}
if (!empty($_GET['get_location']))
{
$data[0]['location'] = $_GET['get_location'];
}
else
{
$data[0]['location'] = '';
}
/**********************New**************************/
/*Building in functionality for area search*/
/***************************************************/
if (!empty($_GET['area']))
{
$data[0]['area'] = $_GET['get_area'];
}
else
{
$data[0]['area'] = '';
}
/***********************************************/
if (!empty($_GET['get_grading']))
{
$data[0]['grading'] = $_GET['get_grading'];
}
else
{
$data[0]['grading'] = '';
}
if (!empty($_GET['get_description']))
{
$data[0]['description'] = $_GET['get_description'];
}
else
{
$data[0]['description'] = '';
}
if (!empty($_GET['get_list_description']))
{
$data[0]['list_description'] = $_GET['get_list_description'];
}
else
{
$data[0]['list_description'] = '';
}
if (!empty($_GET['get_maxGuests']))
{
$data[0]['maxGuests'] = $_GET['get_maxGuests'];
}
else
{
$data[0]['maxGuests'] = '';
}
if (!empty($_GET['get_bedrooms']))
{
$data[0]['bedrooms'] = $_GET['get_bedrooms'];
}
else
{
$data[0]['bedrooms'] = '';
}
if (!empty($_GET['get_parking']))
{
$data[0]['parking'] = $_GET['get_parking'];
}
else
{
$data[0]['parking'
Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the going through something like paypal. I've never done that before...what is my first step? I really dont
Unique Visitor Tracking
Hello. Currently, I run a voting site where voters are tracked by their IP address and can only vote once every 12 hours.The system works well, except it can be exploited very easily. Visitor's only
How can I uploading Transactional Data from Legacy to New SAP system
Hell Gurus,
send() and recv() parameters confusion
On server Side:
parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show anything.I've searched on google but not found a solution for it. The error message:Parse error:
Slow data retrieval which requires improvement..please help
I am working on a Help Desk Ticketing system and have a page called MY TICKETS which shows all tickets in grids. the problem is that the number of records are around 30 to 40 but there is a lag
Making multiple rows with one query
I have a table called efed_handler_characters with two fields handler_id and bio_id. What query 2 is supposed to do is get the id from the handler and then with each char(acter) is supposed to make a
Progress bar for webpage
Hi,I want to implement a progress/waiting bar on my webpage - exactly the same thing that the Microsoft Update web page uses when your PC is being searched for available updates (the green bar that
Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
asking for direction
I have 2 tables in my data, which are "post" and "event"I won't make a summary page for showing the condition of these two tables.so what I am thinking is SELECT the fields inside