Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Goto new page when Item is selected from menu

Status
Not open for further replies.

shawntbanks

Programmer
Oct 29, 2003
48
CA
I have this code, and when I select an Item from a menu, I want it to take me to a new page related to that iteml. Any help would be appricated.

<cfquery datasource=&quot;market&quot; name=&quot;getvehicles&quot;>
select subcategory as vehicletype
, count(*) as vehicles
from adds
where subcategoryid in
( 1 -- cars
, 2 -- trucks & Vans
, 3 -- Boats & Watercraft
, 4 -- Motorcycles
, 5 -- RV's
, 6 -- SUV's
, 7 -- Snowmobiles
, 8 -- Auto Accessories
, 9 -- Farm Equipment
, 10 -- Heavy Equipment
, 11 -- Other
)
group by subcategory
order by subcategory
</cfquery>
<cfset totalvehicles
= ArraySum(ListToArray(
ValueList(getvehicles.vehicles)))>
<cfquery datasource=&quot;market&quot; name=&quot;getrealestate&quot;>
select subcategory as realestatetype
, count(*) as realestate
from adds
where subcategoryid in
( 12 -- Residential - New
, 13 -- Residential - Resale
, 14 -- Vacation Property
, 15 -- Land
, 16 -- Commercial
, 17 -- Industrial
, 18 -- Investment Property

)
group by subcategory
order by subcategory
</cfquery>
<cfset totalrealestate
= ArraySum(ListToArray(
ValueList(getrealestate.realestate)))>

<body>
<form>
<table>
<tr><td><p><strong>Vehicles:
(<cfoutput>#totalvehicles#</cfoutput>
listings)</strong></p></td></tr>
<tr><td><select name=&quot;Vehicles&quot; size=&quot;1&quot;>
<option>--- Choose One ---</option>
<cfoutput query=&quot;getvehicles&quot;>
<option>#getvehicles.vehicletype#
(#getvehicles.vehicles# listings)</option> </cfoutput></select></td></tr>
<tr><td><p><strong>Realestate:
(<cfoutput>#totalRealestate#</cfoutput>
listings)</strong></p></td></tr>
<tr><td><select name=&quot;realestate&quot; size=&quot;1&quot;>
<option>--- Choose One ---</option>
<cfoutput query=&quot;getrealestate&quot;>
<option>#getrealestate.realestatetype#
(#getrealestate.realestate# listings)</option>
</cfoutput> </select></td></tr>
</table>
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top