Forums
This topic is locked
Showing Field from MySQL as hidden to active act.
Posted 08 Dec 2003 19:33:19
1
has voted
08 Dec 2003 19:33:19 Ross Quigley posted:
I am building a search engine that displays a "master/detail" page of results.The visitor has to select a (service) and (location) from the search box
and will display the companies detials within the location on the "master" results page.
Just to explain also , I know exactly how to display the recordsets and know all
SQL details to show the following details on the master page. I also know how to show the
detail page correctly.
Company Name Town More info ( whichis the ID - which will link to the detail page )
However the problem I have is when this !
I add the customer details on a separate page - addcustomer.php
On this page has all the details such as companyName , Town, address et etc.
I have added a checkbox with values 1 when ticked, and 2 when not ticked. This will add
a value to the mysql database into the "active" field. The reason is so that when the customer
is added to the database, it cannot be viewed on the search page until I have made the account
active.
I was thinking of adding a hidden field (the active field) to the master page so that when a
visitor searches on the page the entire recordset will ONLY show if the the field "active" has a value of 2 (ticked)
Can anyone show me the process of how you would go about doing this ?
Would it be in an SQL statement or would it be php ??
Replies
Replied 15 Dec 2003 03:32:19
15 Dec 2003 03:32:19 Phil Shevlin replied:
In your sql select statement (for the page that displays the search results) just add this to the WHERE part
AND active = 2
AND active = 2