need help with logic coding help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
robin1
Forum Newbie
Posts: 20
Joined: Thu Aug 01, 2002 4:36 pm

need help with logic coding help

Post by robin1 »

Hello everybody,
I’m new to php and I have a logic problem in my php code that I cant seem to figure out. Without going into coping and pasting the codes I’ll describe the problem and see what comes back.
Site is http://www.comgen.ca/phptest/mainclas.php
If(true)
If(ture)
{Call a function() // this is where the problem is. It works but I need to keep it going within the function until the end of page.
- within the function I have the if statement
- if($variable == “monitor”)
- { displays all the monitors. Click next to see the
next listing of monitors.
- -but soon as I click either of these optionss “prev 1 2 3 next” it kicks out of the function like the if statement is completed and returns me back to the category list or the main menu. HOW DO I STAY IN THE FUNCTION UNTIL I EXIT WITH THE INTENTION OF EXITING? I tried the while statement but it keeps going in loops..
- - stay in this function until exit
}
else
{ more code ///works the way its designed} //this is where it should go if your finished with the listing of the items-->>main menu..

so.. i like to have a button/link and if that waits for the user to click to exit
how can i do this
is it link
while link not equal to click... help
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

not quite sure (again ;) ) I got the point.
But you want to stay within the php-code until the user (at her/his browser) press' a button?
If so: please read "Before Post Read: Frames, JavaScript, and PHP Overview"
Post Reply