Hey sorry for any unintentioned broken rules - I'm a PHP newbie here.
Does anyone know of any problems with PHP 4.3.11 & using
conditional statements? I"m having a hard time getting
html <ahref >links in my php page to show data from the MYSQL database.
I get a blank page where data from the MYSQL database should be.
I tested out each individual query on MYSQL Server, and through the first function(which works), When I tested out the first conditional statement using the three variables 's', 'st' and 'w'; they all bring up data from MYSQL database,
but when you try to click on any of the three links (subject, workshop, state) nothing happens
here is a piece of my code below, I commented the places that work and the places that don't work
thnx in advance!
========================================================================================
<a href=<?= $PHP_SELF; ?>?v=s">view by subject </a>
<a href=<?= $PHP_SELF; ?>?v=w>view by workshop</a>
<a href=<?= $PHP_SELF; ?>?v=st>view by state</a><br><br>
<?
$v = ($v)?$v:'w';
include_once('../webeditor/config.php3'); // conf variables
include_once('../webeditor/functions.inc.php');// functions
dbconnect();
$workshops = get_cw_listinfo('cw_workshop'); #ten12_dump($workshops);
$subjects = get_cw_listinfo('cw_subject'); #ten12_dump($subjects);
$states = get_stateinfo(); #ten12_dump($states);
/* THIS PART WORKS FINE....
if ($v=='w' && !$s && !$w && !$st){
foreach($subjects as $sid => $subject){
?>
• <a href=<? $PHP_SELF ?> ?s=<?= $sid ?> >
<?= $subject['name'] ?>
</a><br><br>
<?
} //end foreach
}*/
/THIS IS THE PART THAT DOES NOT WORK/
if($v=='s' && !$s && !$w && !$st){
foreach($subjects as $sid => $subject){
?>
• <a href=<? $HTTP_SERVER_VARS['PHP_SELF']; ?> ?s=<?= $sid ?> >
<?= $subject['name'] ?>
</a><br><br>
<?