Perhaps a return, if it's a global function? Like return(1) if success and return(0) if failure or something like that?
However I have a question for you, why do you turn $numdays into a string and then do mathematical operations on it? $numdays = "$numdays"; and $numdays = '5'; Does that force some kind of behavior that's needed? Interesting. Carl Furst Chief Technical Officer Vote.com 50 Water St. South Norwalk, CT. 06854 203-854-9912 x.231 -----Original Message----- From: PHPSpooky [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 11:16 AM To: [EMAIL PROTECTED] Subject: [PHP] Need aternate for "exit;" Glory! I'm stuck in a crazy problem. I have a Global.PHP file that runs the whole show. It's a Link Index Program with a Yahoo Style Directory Structure. There are certain additional features like "New Links", "Popular Links", "Top Rated" etcetera. The global.php file contains functions for each feature. But each function ends with exit; If you don't use the exit; , then the main Category Structure, which is the prime function, a global function, also displays on every page.. And if you do use exit; .. then all the rest of the HTML and Interface code disappears and the page just ends there. This is a problem.. I need to display the rest of the Interface, but not the Category Structure, when you click on a feature like New Links.. Let me give you example of New Links function.. function new_links($numdays) { global $nol; // displays a list of links added in the last x days - limit is $nol links if (!$numdays) { $numdays = '5'; } else { $numdays = "$numdays"; } $time = time(); $mintime = $time - ($numdays * 24 * 60 * 60); $links_sql = "SELECT * FROM sslinks WHERE link_dateadd > $mintime AND link_validated = 'yes' ORDER BY link_dateadd DESC LIMIT 0,$nol"; $links = links_sql($links_sql); echo html_header("New Links"); if (!$links) { $links = ss_template('no_new_links.tmpl'); } echo ss_template('new_links_page.tmpl', array('%maxnumlinks%' => $nol, '%numdays%' => $numdays, '%links%' => $links)); echo html_footer(); exit; } Now this function goes in a place inside a page which has a complete Site interface.. I cant have the page just stop here.. the rest of the Interface needs to display. Removing "exit;" does that.. but also repeats the Directory Structure which is a Global Function.. I tried using "break;" but that doesn't work this way.. Any suggestions? PHPSpooky ______________________________________ "If God had wanted me otherwise, He would have created me otherwise." - Johann Wolfgang von Goethe -- 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