NameSilo

Mod help!

Spacemail by SpaceshipSpacemail by Spaceship
Watch

fried-chicken

Established Member
Impact
5
hi,

Can any one help?
i have two .php files, both relating to check boxes and drop down menus in a search form.

the check boxes and drop down menu options have no relevence to the site it on. eg near school, montain view, sea view. I would like to change them to laundry, pool, etc.

would i need to modifiy the install.php file to, then re-install?

here are the files.

this is the advance.php, which calls for the advancesearchtemplate.php ( i think)

-------------------------------------------
PHP:
<?
require_once("conn.php");

if(isset($_POST[s1]))
{
	if(!empty($_POST[cat]))
	{
		$CatInfo = explode("|", $_POST[cat]);

		$c = $CatInfo[0];
		
		if($CatInfo[1] > '0')
		{
			$s = $CatInfo[1];
		}
	}

	if(!empty($_POST[search_country]))
	{
		$search_country = $_POST[search_country];
	}

	if(!empty($_POST[search_state]))
	{
		$state = $_POST[search_state];
	}

	if(!empty($_POST[search_city]))
	{
		$search_city = $_POST[search_city];
	}

	if(!empty($_POST[search_PropertyType]))
	{
		$search_PropertyType = $_POST[search_PropertyType];
	}

	if(!empty($_POST[MinPrice]))
	{
		$min = $_POST[MinPrice];
	}

	if(!empty($_POST[MaxPrice]))
	{
		$max = $_POST[MaxPrice];
	}

	if(!empty($_POST[MinRooms]))
	{
		$rooms1 = $_POST[MinRooms];
	}

	if(!empty($_POST[MaxRooms]))
	{
		$rooms2 = $_POST[MaxRooms];
	}

	if(!empty($_POST[MinBath]))
	{
		$bath1 = $_POST[MinBath];
	}

	if(!empty($_POST[MaxBath]))
	{
		$bath2 = $_POST[MaxBath];
	}

	if(!empty($_POST[AgentID]))
	{
		$agent = $_POST[AgentID];
	}

	if(!empty($_POST[old]))
	{
		$before = $_POST[old];
	}

	if(!empty($_POST[NearSchool]))
	{
		$school = $_POST[NearSchool];
	}

	if(!empty($_POST[NearTransit]))
	{
		$transit = $_POST[NearTransit];
	}

	if(!empty($_POST[NearPark]))
	{
		$park = $_POST[NearPark];
	}

	if(!empty($_POST[OceanView]))
	{
		$ocean_view = $_POST[OceanView];
	}

	if(!empty($_POST[LakeView]))
	{
		$lake_view = $_POST[LakeView];
	}

	if(!empty($_POST[MountainView]))
	{
		$mountain_view = $_POST[MountainView];
	}

	if(!empty($_POST[OceanWaterfront]))
	{
		$ocean_waterfront = $_POST[OceanWaterfront];
	}

	if(!empty($_POST[LakeWaterfront]))
	{
		$lake_waterfront = $_POST[LakeWaterfront];
	}

	if(!empty($_POST[RiverWaterfront]))
	{
		$river_waterfront = $_POST[RiverWaterfront];
	}

	$url = "search.php?c=$c&s=$s&search_country=$_POST[search_country]&search_state=$_POST[search_state]&search_city=$_POST[search_city]&search_PropertyType=$_POST[search_PropertyType]&min=$min&max=$max&rooms1=$rooms1&rooms2=$rooms2&bath1=$bath1&bath2=$bath2&AgentID=$agent&before=$before&school=$school&transit=$transit&park=$park&ocean_view=$ocean_view&lake_view=$lake_view&mountain_view=$mountain_view&ocean_waterfront=$ocean_waterfront&lake_waterfront=$lake_waterfront&river_waterfront=$river_waterfront";

	header("location:$url");
	exit();
}

require_once("includes.php");
/*
//create the category menu
$CategoryMenu = "<select name=cat>\n\t<option value=\"\"></option>\n\t";

$q1 = "select * from re2_categories order by CategoryName";
$r1 = mysql_query($q1) or die(mysql_error());

if(mysql_num_rows($r1) > '0')
{
	while($a1 = mysql_fetch_array($r1))
	{
		$CategoryMenu .= "<option value=\"$a1[CategoryID]|0\">$a1[CategoryName]</option>\n\t";

		//get the subcategories
		$q2 = "select * from re2_subcategories where CategoryID = '$a1[CategoryID]' order by SubcategoryName ";
		$r2 = mysql_query($q2) or die(mysql_error());
	
		while($a2 = mysql_fetch_array($r2))
		{
			$CategoryMenu .= "<option value=\"$a1[CategoryID]|$a2[SubcategoryID]\">$a1[CategoryName] - $a2[SubcategoryName]</option>\n\t";
		}

	}
}

$CategoryMenu .= "</select>\n";

*/
//create the state menu
$StateMenu = "<select name=search_state>\n\t<option value=\"\">All States</option>\n\t";

$q1 = "select distinct state from re2_listings order by state";
$r1 = mysql_query($q1) or die(mysql_error());

if(mysql_num_rows($r1) > '0')
{
	while($a1 = mysql_fetch_array($r1))
	{
		$StateMenu .= "<option value=\"$a1[state]\">$a1[state]</option>\n\t";
	}
}

$StateMenu .= "</select>\n";

//create the city menu
$CityMenu = "<select name=search_city>\n\t<option value=\"\">All Cities</option>\n\t";

$q1 = "select distinct city from re2_listings order by city";
$r1 = mysql_query($q1) or die(mysql_error());

if(mysql_num_rows($r1) > '0')
{
	while($a1 = mysql_fetch_array($r1))
	{
		$CityMenu .= "<option value=\"$a1[city]\">$a1[city]</option>\n\t";
	}
}

$CityMenu .= "</select>\n";


//create the country menu
$CountryMenu = "<select name=search_country>\n\t<option value=\"\">All Countries</option>\n\t";

$q1 = "select distinct country from re2_listings order by country";
$r1 = mysql_query($q1) or die(mysql_error());

if(mysql_num_rows($r1) > '0')
{
	while($a1 = mysql_fetch_array($r1))
	{
		$CountryMenu .= "<option value=\"$a1[country]\">$a1[country]</option>\n\t";
	}
}

$CountryMenu .= "</select>\n";

//create the PropertyType menu
$TypeMenu = "<select name=search_PropertyType>\n\t<option value=\"\">Any Type</option>\n\t";

$q1 = "select distinct PropertyType from re2_listings order by PropertyType";
$r1 = mysql_query($q1) or die(mysql_error());

if(mysql_num_rows($r1) > '0')
{
	while($a1 = mysql_fetch_array($r1))
	{
		$TypeMenu .= "<option value=\"$a1[PropertyType]\">$a1[PropertyType]</option>\n\t";
	}
}

$TypeMenu .= "</select>\n";


//create the Price Minimum menu
$MinPrice = "<select name=min>\n\t<option value=\"\">Minimum</option>\n\t";

$q1 = "select distinct Price from re2_listings order by Price asc";
$r1 = mysql_query($q1) or die(mysql_error());

if(mysql_num_rows($r1) > '0')
{
	while($a1 = mysql_fetch_array($r1))
	{
		$prices .= "<option value=\"$a1[Price]\">$ $a1[Price]</option>\n\t";
	}
}

$MinPrice .= $prices."</select>\n";


//create the max price menu
$MaxPrice = "<select name=max>\n\t<option value=\"\">Maximum</option>\n\t";
$MaxPrice .= $prices."</select>\n";

//bedrooms
$MinBed = "<select name=MinRooms>\n\t<option value=\"\">Minimum</option>\n\t";

for($i = '1'; $i <= '20'; $i++)
{
	$bed .= "<option value=\"$i\">$i</option>\n\t";
}

$MinBed .= $bed."</select>\n";

$MaxBed = "<select name=MaxRooms>\n\t<option value=\"\">Minimum</option>\n\t";
$MaxBed .= $bed."</select>\n";

//bathrooms
$MinBath = "<select name=MinBath>\n\t<option value=\"\">Minimum</option>\n\t";

for($i = '1'; $i <= '10'; $i++)
{
	$bath .= "<option value=\"$i\">$i</option>\n\t";
}

$MinBath .= $bath."</select>\n";

$MaxBath = "<select name=MaxBath>\n\t<option value=\"\">Minimum</option>\n\t";
$MaxBath .= $bath."</select>\n";

//agents menu
$q1 = "select AgentID, FirstName, LastName from re2_agents order by FirstName, LastName";
$r1 = mysql_query($q1) or die(mysql_error());

$AgentsMenu = "<select name=AgentID>\n\t<option value=\"\">Any Agent</option>\n\t";

if(mysql_num_rows($r1) > '0')
{
	while($a1 = mysql_fetch_array($r1))
	{
		$AgentsMenu .= "<option value=\"$a1[AgentID]\">$a1[FirstName] $a1[LastName]</option>\n\t";
	}
}

$AgentsMenu .= "</select>\n";

require_once("templates/HeaderTemplate.php");
require_once("templates/AdvancedSearchTemplate.php");

if(!ereg("index.php", $_SERVER[SCRIPT_NAME]))
{
	require_once("templates/FooterTemplate.php");	
}

?>
-----------------------------------------------

this is the advancesearchtemplate.php

----------------------------------------------
PHP:
<form method=POST action="advanced.php">

<table align=center width=500>
<caption align=center><font size=2><b>Advanced search</b></font></caption>

<tr>
	<td>Price:</td>
	<td><?=$MinPrice?></td>
	<td><?=$MaxPrice?></td>
	<td>Near School</td>
	<td><input name=NearSchool type=checkbox value="y"></td>
</tr>

<tr>
	<td>Bedrooms:</td>
	<td><?=$MinBed?></td>
	<td><?=$MaxBed?></td>
	<td>Near Transit</td>
	<td><input name=NearTransit type=checkbox value="y"></td>
</tr>

<tr>
	<td>Bathrooms:</td>
	<td><?=$MinBath?></td>
	<td><?=$MaxBath?></td>
	<td>Near Park</td>
	<td><input name=NearPark type=checkbox value="y"></td>
</tr>

<tr>
	<td>Type:</td>
	<td colspan=2><?=$TypeMenu?></td>
	<td>Ocean View</td>
	<td><input name=OceanView type=checkbox value="y"></td>
</tr>

<tr>
	<td>Listed By:</td>
	<td colspan=2><?=$AgentsMenu?></td>
	<td>Lake View</td>
	<td><input name=LakeView type=checkbox value="y"></td>
</tr>

<tr>
	<td>Show Listings:</td>
	<td colspan=2>
		<select name=old>
			<option value="">All Listings</option>
			<option value="1 day">1 day old</option>
			<option value="2 days">2 days old</option>
			<option value="3 days">3 days old</option>
			<option value="1 week">1 week old</option>
			<option value="1 month">1 month old</option>
		</select>	
	</td>
	<td>Mountain View</td>
	<td><input name=MountainView type=checkbox value="y"></td>
</tr>


<tr>
	<td>City:</td>
	<td colspan=2><?=$CityMenu?></td>
	<td>Ocean Waterfront</td>
	<td><input name=OceanWaterfront type=checkbox value="y"></td>
</tr>


<tr>
	<td>State:</td>
	<td colspan=2><?=$StateMenu?></td>
	<td>Lake Waterfront</td>
	<td><input name=LakeWaterfront type=checkbox value="y"></td>
</tr>

<tr>
	<td>Country:</td>
	<td colspan=2><?=$CountryMenu?></td>
	<td>River Waterfront</td>
	<td><input name=RiverWaterfront type=checkbox value="y"></td>
</tr>

<tr>
	<td colspan=2> </td>
	<td colspan=3><input type=submit name=s1 value="Search Listings"></td>
</tr>

</table>

</form>
-----------------------------------------

this is the install.php

-----------------------------------------
PHP:
<?
require_once("conn.php");

$q1 = "DROP TABLE IF EXISTS re2_admin";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_admin (
  AdminID varchar(50) NOT NULL default '',
  AdminPass varchar(32) NOT NULL default '',
  AdminName varchar(100) NOT NULL default '',
  AdminEmail varchar(150) NOT NULL default '',
  PRIMARY KEY (AdminID))";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_admin VALUES ('admin', 'admin', 'Deb', '[email protected]')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "DROP TABLE IF EXISTS re2_agents";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_agents (
  AgentID int(10) NOT NULL auto_increment,
  AccountType int(1) not null default '',
  username varchar(50) NOT NULL default '',
  password varchar(32) NOT NULL default '',
  FirstName varchar(150) NOT NULL default '',
  LastName varchar(150) NOT NULL default '',
  resume text NOT NULL,
  phone varchar(50) NOT NULL default '',
  cellular varchar(50) NOT NULL default '',
  pager varchar(50) NOT NULL default '',
  ResumeImages text NOT NULL,
  email varchar(150) NOT NULL default '',
  logo varchar(255) NOT NULL default '',
  RegDate int(10) NOT NULL default '0',
  ExpDate int(10) NOT NULL default '0',
  AccountStatus varchar(20) NOT NULL default 'pending',
  PriorityLevel int(1) NOT NULL default '2',
  offers int(3) NOT NULL default '0',
  news char(1) NOT NULL default 'y',
  NewsletterType varchar(10) NOT NULL default 'plain',
  days10 char(1) NOT NULL default 'n',
  days5 char(1) NOT NULL default 'n',
  days1 char(1) NOT NULL default 'n',
  PRIMARY KEY (AgentID),
  UNIQUE KEY username(username),
  UNIQUE KEY email(email))";

mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "DROP TABLE IF EXISTS re2_banners";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_banners (
  ClientID int(10) NOT NULL default '0',
  BannerID int(10) NOT NULL auto_increment,
  BannerURL varchar(255) NOT NULL default '',
  BannerFile varchar(255) NOT NULL default '',
  BannerAlt varchar(255) NOT NULL default '',
  BannerType varchar(50) NOT NULL default '',
  bCat int(10) NOT NULL default '0',
  bSub int(10) NOT NULL default '0',
  PRIMARY KEY (BannerID))";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "DROP TABLE IF EXISTS re2_categories";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_categories (
  CategoryID int(10) NOT NULL auto_increment,
  CategoryName varchar(255) NOT NULL default '',
  PRIMARY KEY (CategoryID),
  UNIQUE KEY CategoryName(CategoryName))";

mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_categories VALUES (3, 'For Sale')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_categories VALUES (4, 'For Rent')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "DROP TABLE IF EXISTS re2_listings";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_listings (
  ListingID int(10) NOT NULL auto_increment,
  AgentID int(10) NOT NULL default '0',
  CategoryID int(10) NOT NULL default '0',
  SubcategoryID int(10) NOT NULL default '0',
  address text NOT NULL,
  city varchar(100) NOT NULL default '',
  state varchar(100) NOT NULL default '',
  country varchar(150) NOT NULL default '',
  ShortDesc text NOT NULL,
  DetailedDesc text NOT NULL,
  Price float(15,2) NOT NULL default '0.00',
  PropertyType varchar(50) NOT NULL default '',
  neighbourhood text NOT NULL,
  rooms int(2) NOT NULL default '0',
  bathrooms int(2) NOT NULL default '0',
  fireplace char(1) NOT NULL default 'n',
  garage int(2) NOT NULL default '0',
  SquareMeters float(15,2) NOT NULL default '0.00',
  LotSize float(15,2) NOT NULL default '0.00',
  HomeAge int(3) NOT NULL default '0',
  NearSchool char(1) NOT NULL default 'n',
  NearTransit char(1) NOT NULL default 'n',
  NearPark char(1) NOT NULL default 'n',
  OceanView char(1) NOT NULL default 'n',
  LakeView char(1) NOT NULL default 'n',
  MountainView char(1) NOT NULL default 'n',
  OceanWaterfront char(1) NOT NULL default 'n',
  LakeWaterfront char(1) NOT NULL default 'n',
  RiverWaterfront char(1) NOT NULL default 'n',
  image text NOT NULL,
  DateAdded int(10) NOT NULL default '0',
  visits int(10) NOT NULL default '0',
  PRIMARY KEY (ListingID)) ";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "DROP TABLE IF EXISTS re2_mail_archive";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_mail_archive (
  subject varchar(255) NOT NULL default '',
  message text,
  MailDate int(10) NOT NULL default '0')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "DROP TABLE IF EXISTS re2_prices";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_prices (
  PackageName varchar(50) NOT NULL default '',
  PriceID int(10) NOT NULL auto_increment,
  PriceValue float(5,2) NOT NULL default '0.00',
  Duration varchar(10) NOT NULL default '',
  PriorityLevel int(1) NOT NULL default '0',
  PriceType varchar(10) NOT NULL default '0',
  offers int(10) NOT NULL default '0',
  PRIMARY KEY (PriceID))";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_prices VALUES ('Realtor Bronze', 7, '14.95', '1', 1, 'Realtor', 5)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_prices VALUES ('Private Listing', 9, '9.95', '1', 1, 'Private', 1)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_prices VALUES ('Realtor Silver', 10, '24.95', '1', 1, 'Realtor', 10)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_prices VALUES ('Realtor Gold', 11, '39.95', '1', 1, 'Realtor', 20)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);



$q1 = "DROP TABLE IF EXISTS re2_priority";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_priority (
  PriorityID int(10) NOT NULL auto_increment,
  PriorityName varchar(50) NOT NULL default '',
  PriorityLevel int(1) NOT NULL default '0',
  PRIMARY KEY (PriorityID),
  UNIQUE KEY PriorityName(PriorityName))";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_priority VALUES (1, 'Standard', 1)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);




$q1 = "DROP TABLE IF EXISTS re2_settings";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_settings (
  id int(1) NOT NULL default '0',
  SiteTitle varchar(255) NOT NULL default '',
  SiteName varchar(255) NOT NULL default '',
  SiteKeywords varchar(255) NOT NULL default '',
  SiteDescription text,
  ContactEmail varchar(150) NOT NULL default '',
  CompanyAddress text,
  PayPalEmail varchar(150) NOT NULL default '',
  SellerID int(6) NOT NULL default '0',
  Agreement text NOT NULL,
  sp_vendor_email varchar(255) NOT NULL default '',
  sp_payee_email varchar(255) NOT NULL default '',
  sp_secret_code varchar(255) NOT NULL default '')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_settings VALUES ('1', 'My Real Estate', 'My Real Estate', 'real estate, sales, rent, for rent, for sale, house, houses, appartment, appartments, studio, studios, rooms', 'Find property for sale and rent', '[email protected]', '1234 My Street/r/n Red Deer, Alberta /r /nCanada', '[email protected]', '12345', '<strong>User Agreement</strong><br> <p><br>The information presented by this siteis deemed to be accurate, but it has not been independently verified. We make no guarantee, warranty or representation. It is the user\'s responsibility to independently confirm accuracy and completeness. </p><p>User Conduct<br>User agrees to abide by all applicable local, state, national and foreign laws, treatises and regulations in connection with the service. The user agrees to not transmit or post information that is harmful to other members.</p<p>Termination<br>This website in its sole discretion, may terminate user\'s password, account or use of the service and remove and discard any data within the service if user fails to comply with this Agreement. User may terminate the service upon notice to this website at any time; however, user will not receive a refund of any portion of fees paid. Upon termination, user\'s rights to use the service, web solutions, domain name, design and associate technologies will also terminate. </p><p>Indemnification<br>User shall indemnify and hold e1solutions and its parents, subsidiaries, affiliates, officers, directors, employees, attorneys, and agents, harmless from and against any and all claims, costs, damages, losses, liabilities, and expenses (including attorneys\' fees and costs) arising out of, or in connection with user\'s use of the service (including the content) or breach of this Agreement. </p><p>Limitation of Liability<br>In no event shall this website aggregate liability exceed the amount actually paid by user in the twelve (12) month period immediately preceding the event giving rise to such a claim. In no event shall e1 Solutions be liable to anyone for any indirect, punitive, special, exemplary, incidental, consequential or other damages of any type or kind arising out of, or in any way connected with this service, including but not limited to user\'s use or inability to use the service or for any content obtained from or through the service, even if e1 solutions has been previously advised of the possibility of such damages. </p><p><br></p>', '', '', '')";

mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "DROP TABLE IF EXISTS re2_stats";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_stats (
  BannerID int(10) NOT NULL default '0',
  impressions int(10) NOT NULL default '0',
  clicks int(10) NOT NULL default '0',
  mydate int(10) NOT NULL default '0',
  ip varchar(50) NOT NULL default '')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "DROP TABLE IF EXISTS re2_subcategories";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_subcategories (
  SubcategoryID int(10) NOT NULL auto_increment,
  SubcategoryName varchar(255) NOT NULL default '',
  CategoryID int(10) NOT NULL default '0',
  PRIMARY KEY (SubcategoryID))";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (3, 'Apartments/Suites', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (4, 'Duplexes/Houses', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (5, 'Farms/Lots and Acreages', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (6, 'Garages & Parking Space', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (7, 'Mobile Homes', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (8, 'Out of Town', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (9, 'Room and Board/Rooms', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (10, 'Shared Accomodation', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (11, 'Storage Space', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (12, 'Townhouses/Condos', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (13, 'Vacation Rentals', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (14, 'Wanted to Rent', 4)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (15, 'Commercial/Industrial', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (16, 'Duplexes/Houses', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (17, 'Farms/Ranches', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (18, 'Income Properties', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (19, 'Lots/Acreages', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (20, 'Mobile Homes', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (21, 'New Homes', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (22, 'Opem Houses', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (23, 'Real Estate Services', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (24, 'Vacation Property', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_subcategories VALUES (25, 'Wanted', 3)";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);




$q1 = "DROP TABLE IF EXISTS re2_types";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "CREATE TABLE re2_types (
  TypeID int(10) NOT NULL auto_increment,
  TypeName varchar(100) NOT NULL default '',
  PRIMARY KEY (TypeID),
  UNIQUE KEY TypeName(TypeName))";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);


$q1 = "INSERT INTO re2_types VALUES (20, 'Farm')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (19, 'Acreage')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (18, 'Ranch')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (17, 'Townhouse')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (16, 'Rooms')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (15, 'Mobile Home')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (14, 'Lot')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (13, 'Land')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (12, 'Industrial')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (11, 'Houses')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (10, 'Condo')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (8, 'Commercial')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

$q1 = "INSERT INTO re2_types VALUES (9, 'Appartments')";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);

echo "<center><br><br><br><font face=tahoma, verdana, helvetica, arial size=2 color=black><b>The database tables was installed successfully!<br><br>Delete this file from your server!</b></font></center>";


?>
 
Last edited by a moderator:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
I don't really know what you are talking about, but from what I gather, you want a search form with your own custom fields?

I think that you should reqrite the scripts yourself. The first two should be rewritten from scratch I think. Maybe refer back to the origional scripts. The last one you can just change the bits that need changing, but I would rewrite the whole lot.

It just depends on whether you can be bothered. Personally, I would rewrite the whole lot from scratch, because then it has the elements I want, and then it is coded in my style etc... makes it more manageable, but then again, I rewrite any script that I get.

Good Luck with it though
Tom
 
0
•••
hi,

i not really that familiar with re-writing scripts, but i want to give it a go. do you know of a good site fing out more information?
 
0
•••
firstly, where is the script from?
secondly, do you know much php?

What you can do is use namepros and php.net to help you. If you come across anything you don't really understand if you goto php.net/#what you dont understand# (eg: php.net/strlen OR php.net/if etc...) then it will give you the php manual definiton of that code. If that dosen't work though then feel free to just ask here. There are loads of people here who will help you out.

Good Luck :)
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back