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'
Bandwidth monitoring?
Hi guys,I need a little information I have written a php app and I occurred to that I need to track the bandwidth that the user is using. I have done a google search and looked through my php books
how to get sn motherboard
Hello.
VAT
how should I deal with VAT?if I have a product that costs £5.00 and VAT @ 17.5% (£0.875) the total cost of the product is £5.875.so how do people deal with VAT should I round up/down? are
On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be purchased, but that is unrelated) for view of a certain page. I need help in figuring out what php I
socket communication between c++/java and sending image
hi, i have a class in c++ called win32_sockserver which creates socket to java. i am trying to send image c++ to java and using the most basic method. i am sending image's rgb values as a string. But
Extract specific information from a PHP Multidimensional Array
Howdy! I've racked my brain over this for 24 hours now. I think it's time I asked for help. I'm learning PHP and believe my I've manipulated many code blocks trying to get this to work with for and
Frustrated php Newbie
First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so I figured I could get this to work.So, my plan was to make a simple SQL server with a PHP bullitin
Revoking alter any table from a schema
Hi All,
Create PHP table grid help, please
I have a MySQL database setup, now it's time for the table (gridview) design in php. Here's the problem i'm having. I have about 22 colms, but from colm 10 to 16 I want to place in one colm from 1 up
passthru() help
Hi everyone,I'm new to the forum and to PHP. I have some pretty good experience writing shell scripts, but beyond that, I'm not much of a programmer. That being said, here's what I'm trying to do:I'm