On Monday 15 April 2002 21:05, Kevin Meredith wrote: > Hi. > > How can I reprocess a page if a certain variable is received. > > I am selecting companies for specific users from which they can select the > required company and proceed further. Using variables on the same page > using PHP_SELF. This then shows a list of contacts for the chosen company. > In some cases the user only has access to one company. I would like to > have the page skip the company choosing section and proceed straight to the > list. > > I had thought to do a count on the rows returned from the database and if > that was == 1 then assign the relative variable and refresh the page. Is > there perhaps an easier or better way to achieve the same results?
Arrange it so that your script displays parts according to what is received. Something like: if ("no input yet") { if ("user->company" > 1) { display list of companies; } else { show contacts }} else { if ("input and company") { show contacts } } -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Criticism comes easier than craftsmanship. -- Zeuxis */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php