How would i go about doing something like this, I want to show the include file if it's a certain login else show all the html if it's another login???
PHP Code:
<?php if (login::$arre_company == 'APS') { include('task/APS/include/rx_tracker.php'); }?>
If all you want to do is include the other file and be done with it, the simplest thing might be:
PHP Code:
<?php
if($somethingIsTrue) {
include "the/include/file.php";
exit;
}
?>
<p>rest of page here</p>
Otherwise, just use an else block around whatever needs to be done:
PHP Code:
<?php
if($somethingIsTrue) {
include "the/include/file.php";
}
else {
?>
<p>rest of page here</p>
<?php
} // need to close up the else block
?>
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks