I have never had a boolean work in php although i havet only tinkered.
I am putting 8 records filled with html into a mysql table, w1----w8 .
When the webpage loads i only need retrieve the first record (w1) and then echo it, the others(w2--w8) are controlled by the <form method = "post" dependng if values are posted or not. So if values are posted then (w2---w8) are echo'ed. w1 contains the header html with the css link for the webpage hence it sets the main layout. Whereas w2----w8 are a noticeboard (or forum) like where values are being appended into the page.
So i though i'd use a Boolean to make the first record only display once, i.e when the page loads at first, i tried this (but this doesn't work, every time i "<form post" w1 still gets echo'ed.......?
PHP Code:
if ($foo == True) {
mysql_select_db("webinfo", $con);
$sql="SELECT w1 FROM webdata";
if ($result=mysql_query($sql)) {
$foo = False;
echo $result;
}