The isAttendanceReport() fails... so in the displayMenu() function I get Print Attendance Sheet No Attendance Report Available1 > Note that it is good practice to use { } around your statement(s). I am under the opression that it is only for when you have multistatement groups and not just a one statement after a condition? Please correct me if I am wrong. Thanks Gary On Tue, 28 Dec 2004 19:24:28 +0800, Jason Wong <php-general@xxxxxxxxxxxx> wrote: > On Tuesday 28 December 2004 13:00, GH wrote: > > > I am having a problem with some php that I have written... In an > > attempt to clearly state the problem and how it is supposed to work > > the following may be lengthy, to which I appologize for. > > It's better to have a lengthy explanation of what your problem is rather than > havong to trade posts back and forth trying to determine what your problem > is, so no need to apologize. NB it is good to have a lengthy explanation but > not good to post lengthy code. > > > I am not getting the results that I am expecting. I am using the > > following url to access my page. > > > > http://localhost/AHRC_PL/ahrc_programleader/ahrc_programleader.php?SID=1&ge > >t_switch=0 > > So what *do* you get? > > > In the displayMenu() function it is (1) supposed to print out a link > > to get an Attendance Sheet for the SID and (2) check if an attendance > > report exists using the isAttendance Report() function... if there is > > it prints out a link to it (ahrc_programleader.php with SID=$SID and > > get_switch = 1. Otherwise it prints out "No Attendance Report > > Available". the function isAttendanceReport() is supposed to return > > either a 0 if no report or invalid session id or 1 for is a report. > > > > function displayMenu($SID){ > > echo "<a href=\"ahrc_programleader.php?SID=".$SID."&get_switch=2\">Print > > Attendance Sheet </a><br />\n"; > > if(isAttendanceReport($SID)) > > echo "<a href=\"ahrc_programleader.php?SID=". $SID . > > "&get_switch=1\"> Print Attendance Report </a> <br>\n"; > > else > > Note that it is good practice to use { } around your statement(s). > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > ------------------------------------------ > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > ------------------------------------------ > /* > Make me look like LINDA RONSTADT again!! > */ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php