tuxbuddy Posted April 14, 2008 Share Posted April 14, 2008 I have taken snippet of code from a tool called HelpCORE.Here a submit button is there which when clicked displays the query for incidents taken place from database table. As you can see below in the code few variables it is fetching and able to display.But I need some help regarding the following lines : $GLOBALS['box']->add( text( 'reporter' ), '<FORM method="GET" action="' . BASE_URL . 'module_helpcore_public/reporter.php"> <INPUT type="submit" value="'.text('finished').'"> <INPUT type="hidden" name="incidentsaction" value="show"></SPAN><br />' ); It displays a button called finished which when clicked goes to fetch reporter.php page..but if yu see below code,I have used it for two times separately for Open and finished Can someone help me to write both the options under one box and separate link say, reporter.php should be called if open is clicked and reporter2.php shoud be fetched if finished is clicked. Below is the complete code. if ( ! include( '../coreapm/coreapm.php' ) ) { die( 'Cannot include CORE APM' ); } if( ! ( O_PUBLIC_SHOWINCIDENTSTATUS && USE_INCIDENTS ) ) { $GLOBALS['box']->add( text( 'warning' ), text( 'administrator_disabled' ) ); $coreapm->finish(); die; } $GLOBALS['cache']->no_cache = true; $coreapm->start(); $GLOBALS['box']->add( text( 'fill_in_incidentnumber' ), '<SPAN class="center">' . text( 'incidentnumber' ) . '<FORM method="GET" action="' . BASE_URL . 'module_helpcore_public/incidents.php?incidentsaction=show"><INPUT type="text" name="incidentsshowid" maxlength=32 size=32><INPUT type="submit" value="'.text('search').'"><INPUT type="hidden" name="incidentsaction" value="show"></SPAN><br />' ); $GLOBALS['box']->add( text( 'reporter' ), '<FORM method="GET" action="' . BASE_URL . 'module_helpcore_public/reporter.php"> <INPUT type="submit" value="'.text('open').'"> <INPUT type="hidden" name="incidentsaction" value="show"></SPAN><br />' ); $GLOBALS['box']->add( text( 'reporter' ), '<FORM method="GET" action="' . BASE_URL . 'module_helpcore_public/reporter.php"> <INPUT type="submit" value="'.text('finished').'"> <INPUT type="hidden" name="incidentsaction" value="show"></SPAN><br />' ); $coreapm->finish(); ?> Pls Help Link to comment https://forums.phpfreaks.com/topic/101001-issue-with-global-variables/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.