[thelist] PHP self referring page probs

fstorr fffrancis at fstorr.demon.co.uk
Sun Aug 17 11:39:27 CDT 2003


Hi all

I'm also fairly new to PHP, and it's been a fair while since I've done 
anything like this (I used to use ASP several years ago).  I'm building 
a dictionary of jargon and technical speak for my company's intranet. 
The user searches for a term and gets passed to a results page.  The 
results page is supposed to work like this:

Assuming that something has been searched for, check of more than 1 row 
of results returned.  If there is, then present user with a list of 
terms.  The user selects the term of choice and the page refers back to 
itself the term.

If there is only 1 results returned (so, if the search has returned one 
result or the page has been self-referred), show the term and all 
relavent definitions (as a term can have more than one of these).

I've got it all sort of working, but I can't work out what is it is 
that's wrong.  Searching on a term that brings back one result still 
gives me a 'your search has returned more than one result' but only 
lists one result, and I can't work out how to display just one heading 
for a term with multiple definitions.  It should be easy, but I just 
can't get it.

I can't show you a like working version, but the PHP (as a text file) is 
here:

http://www.thespiceweasel.com/dotresults.txt

Any help would be gratefully received.

Regards

Francis






More information about the thelist mailing list