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'
Cron Job and Output
I have php codes running under a cron job.But everytime i output (echo) , it comes out as complete text:THe php script is setup to output some stuff so they are sent to the cron email...but all the
Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to do everything I want except for this. I want the script to only show 5 at a time (which i have
removing space from the end of a variable
i have a variable $image which contains the following url "http://tiles.xbox.com/tiles/oo/P5/0mdsb2JgbA9ECgR8GgMfWSpVL2ljb24vMC84MDAwIAABAAAAAP3Wg70=.jpg"but for some reason it is breaking
Text Not Displaying Correctly With PHP:GD
I recently moved servers and since then I have noticed that one line of text is showing weirdly.I have attached an example image that was generated. In the word 'Managing' the letters M & N
problem with array - multilingual page
this is my test page :Code: <?php if(isset($_GET['lang'])) { if($_GET['lang'] == "en") { require_once("languages/lang-en.php"); }
Array becomes unset by itself?
Hi,I have a bit of experience with PHP but not extensive. It seems I cannot store any items to the array $details. The class:class Newsletter {public $details = array();function Newsletter($id)
Whats wrong with my query?
I am trying to get this query to show the appropriate ticked vehicle roof height, unless no boxs are ticked then I want it to display all vehicle roof heights. However it doesn't work correctly, for
Creating a function
Basically i wanna put all this code in a seperate file Code: <?php $query = "select product.ProductID, product.ProductName, product.ProductCategory,
how can we add data from dynamic fields to mysql db in php
i have a script which i found on the internet. i modify that script according to my needs. what is in that script is there are three form fields with two buttons. one button is "Give me more
Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Internet by just two people: Me & one client.When running in VS2008 it works perfectly fine but when