Jump to content

wont echo


FUNKAM35
Go to solution Solved by adam_bray,

Recommended Posts

$select = "SELECT prop_id, ref, complex, price, beds, location, type, disc, sold, updated FROM sales ".$order;
echo  "<table width=\"80%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"left\"><tr><td class=\"norm\" align=\"left\"><div class=\"styled-select\"><form id=\"formorder\" action=\"$_SERVER[REQUEST_URI]\" method=\"get\"><select name=\"order_by\"onChange=\"UpdateQty(this)\" ><option value=\"sort by\" selected=\"selected\">Sort by</option><option value=\"priceasc\">Lowest Price First</option><option value=\"pricedesc\">Highest Price First</option><option value=\"newest\">Recently Added</option><option value=\"updated\">Recently Updated</option><option value=\"bedsasc\">Beds (Low to High)</option><option value=\"bedsdesc\">Beds (High to Low)</option></select><input type=\"submit\" name=\"submit\" id=\"button\" value=\"go\"></form></div></td>

<td class=\"norm\" align=\"left\">\n";
if($order_by=="priceasc"){
echo"Sorted by Lowest Price First";
}
if($order_by=="pricedesc"){
echo"Sorted by Highest Price First";
}
if($order_by=="newest"){
echo"Sorted by Recently Added Properties First";
}
if($order_by=="updated"){
echo"Sorted by Recently Updated Properties First";
}
if($order_by=="bedsdesc"){
echo"Sorted by Recently Added Properties First";
}
if($order_by=="bedsasc"){
echo"Sorted by Recently Updated Properties First";
}
echo"</tr></td></table>\n";

the following script does not display the sorted by part

It works in that it changes the order but the echo Sorted by does not display instead it displays nothing, please help spent hours trying to figure it out. thanks

Link to comment
Share on other sites


<?php
if(empty($_GET['order_by']))$order="order by price ASC ";
if($_GET['order_by']=='priceasc')$order="order by price ASC ";
if($_GET['order_by']=='pricedesc')$order="order by price DESC ";
if($_GET['order_by']=='newest')$order="order by prop_id DESC ";
if($_GET['order_by']=='updated')$order="order by updated DESC ";
if($_GET['order_by']=='bedsasc')$order="order by beds ASC ";
if($_GET['order_by']=='bedsdesc')$order="order by beds DESC ";
?>
this is at the top of the page
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.