![](http://content.invisioncic.com/r49260/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
marquis
-
Posts
41 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by marquis
-
-
html<img src="images/bigdoglogo.gif" width="220"height="75" border="0">cssimg{float:none; margin:0 15px 15px 0; padding:1px; background:#ffffff; border:none solid #d0d0d0; border-style:none}
-
ok the only reason it i asked if there was a way to do it in the html code was cause the css way didnt work niether did the html way.
-
this is on the css right is there any way to do it in the html code
-
when i display an image there is a white line bordering the image it here any way to get rid of it<img src="images/bigdoglogo.gif" width="220"height="75">
-
-
yes this is the frist time for me to try do this and and that what i though to do first but it doesnt work$result = mysql_query($SQL); if(!$result)ECHO "NO MATCHES FOUND";after using justsomeguy's suggestion it worked fine
-
after running a search through a database how do you get it to say no matches if nothing matched there search criteriaif you would like to see my code just ask
-
all i was saying about min=0 since im setting min = to zero instead of just leaving it blank it will always have a value so the only if statement that could be possible is the number 3 one you gave me meaning less code for me to writeunforchanly my syntax on php is also very bad it proble going to take a while to fix itthis way is going to take an unreal amount of if statements because of placing the "where" and "ands" cause if you dont get them in the right spot the quiery fails
-
ok using your code i get a parse error on this line$SQL = $SQL . 'city='".$city."'' . 'AND';here the errorParse error: parse error, unexpected '"' in C:\Documents and Settings\Marquis Taliaferro\Desktop\web page\results.php on line 32new questionbecause of the fact that im settng the min as 0 the only if statement that could be true is 3. contains min / missing max - $SQL .= 'price>='".$pricemin."''if in the form i set Nomax="" would the if statement to test this beif($_GET["pricemax"]="")
-
while this is a good idea i had already though of that and while this get me around the empty strings part of it it doesnt help me with the fact that im going to need a wild card are something to that effect to set the max price as if they dont want there to be a max max price.with the min price i can achieve the same thing by setting the min price to zero. I say max price but the applies to all the max values in the form.
-
ok here is my code
<html><head><link rel="stylesheet" href="CSS.css" type="text/css" /><title>Search Results</title></head><body><div id="sidebar"><img src="images/bigdoglogo.gif" width="215"height="75"><div id="menu"><a href="Home.html">Home</a><a href="Apartments.php">Apartments</a><a href="Industrial.php">Industrial</a><a href="Land.php">Land</a><a href="Retail.php">Retail</a><a href="OfficeSpace.php">Office Space</a><a href="AboutUs.html">About Us</a><a href="CMS.php">Realtor login</a></div></div><div id="content"></body><?phpif($_GET["city"])$city=$_GET["city"];else$city='%';if($_GET["state"])$state=$_GET["state"];else$state='%';if($_GET["zipcode"])$zipcode=$_GET["zipcode"];else$zipcode='%';if($_GET["pricemin"])$pricemin=$_GET["pricemin"];if($_GET["pricemax"])$pricemax=$_GET["pricemax"];else$pricemax='%';if($_GET["bathsmin"])$bathsmin=$_GET["bathsmin"];if($_GET["bathsmax"])$bathsmax=$_GET["bathsmax"];else$bathsmax='%';if($_GET["bedroomsmin"])$bedroomsmin=$_GET["bedroomsmin"];if($_GET["bedroomsmax"])$bedroomsmax=$_GET["bedroomsmax"];else$bedroomsmax='%';if($_GET["county"])$county=$_GET["county"];else$county='%';if($_GET["buyorlease"])$buyorlease=$_GET["buyorlease"];else$buyorlease='%';$con = mysql_connect("localhost","root","*****");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("realestate", $con);$result = mysql_query("SELECT * FROM estateWHERE city='".$city."'AND state='".$state."'AND zipcode='".$zipcode."'AND priceBETWEEN '".$pricemin."' AND '".$pricemax."'AND bathsBETWEEN '".$bathsmin."' AND '".$bathsmax."'AND bedroomsBETWEEN '".$bedroomsmin."' AND '".$bedroomsmax."'AND county='".$county."'AND buyorlease='".$buyorlease."'");while($row = mysql_fetch_array($result)) {echo "<table border='1'> <tr> <th>Address</th> <th>Price</th> <th>Baths</th> <th>Bedrooms</th> <th>State</th> <th>City</th> <th>Square Feet</th> <th>County</th> <th>Year Built</th> <th>Buy or Lease</th> </tr>"; echo "<tr>"; echo "<td>" . $row['address'] . "</td>"; echo "<td>" . $row['price'] . "</td>"; echo "<td>" . $row['baths'] . "</td>"; echo "<td>" . $row['bedrooms'] . "</td>"; echo "<td>" . $row['state'] . "</td>"; echo "<td>" . $row['city'] . "</td>"; echo "<td>" . $row['squarefeet'] . "</td>"; echo "<td>" . $row['county'] . "</td>"; echo "<td>" . $row['yearbuilt'] . "</td>"; echo "<td>" . $row['buyorlease'] . "</td>"; echo "</tr>"; echo "</table>"; }if($result==0)ECHO "<h3>NO MATCHES FOUND!</h3>";mysql_close($con);?></body></html>
as far as error go its working but i am having 2 problemif no search results far found i want it to say none are foundalso i am trying to make it to where if nothing is entered in the form i want it to disregard that part of the form i tried to do this by using wildcards but this didn't work
-
from what i can tell i follows your tutorial exactly i copied and pasted your code and then modified it for my purposedhere it is<?php$con = mysql_connect("localhost","root","******");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("realestate", $con);$result = mysql_query("SELECT * FROM estateWHERE type='retail'");while($row = mysql_fetch_array($result)) { echo "<table border='1'> <tr> <th>Address</th> <th>Price</th> <th>Baths</th> <th>Bedrooms</th> <th>State</th> <th>City</th> <th>Square Feet</th> <th>County</th> <th>Year Built</th> <th>Buy or Lease</th> </tr>"; echo "<tr>"; echo "<td>" . $row['Address'] . "</td>"; echo "<td>" . $row['Price'] . "</td>"; echo "<td>" . $row['Baths'] . "</td>"; echo "<td>" . $row['Bedrooms'] . "</td>"; echo "<td>" . $row['State'] . "</td>"; echo "<td>" . $row['City'] . "</td>"; echo "<td>" . $row['Squareft'] . "</td>"; echo "<td>" . $row['County'] . "</td>"; echo "<td>" . $row['YearBuilt'] . "</td>"; echo "<td>" . $row['BuyorLease'] . "</td>"; echo "</tr>"; echo "</table>"; }mysql_close($con);?>i get this when entered Address Price Baths Bedrooms State City Square Feet County Year Built Buy or Lease "; echo ""; echo "" . $row['Address'] . ""; echo "" . $row['Price'] . ""; echo "" . $row['Baths'] . ""; echo "" . $row['Bedrooms'] . ""; echo "" . $row['State'] . ""; echo "" . $row['City'] . ""; echo "" . $row['Squareft'] . ""; echo "" . $row['County'] . ""; echo "" . $row['YearBuilt'] . ""; echo "" . $row['BuyorLease'] . ""; echo ""; echo ""; } mysql_close($con); ?>any idea of why this is??
images outline
in HTML/XHTML
Posted
yea that didnt work its real wierdits not that big of a deal it would just be nice it not have the 1 px of white seperation