Page 3 of 3
Posted: Thu Jul 05, 2007 4:31 am
by volka
ghadacr wrote:I dont think that is helpful....
It would be.
No offense but in this case to change
echo $colour1 == $colour;
into
echo $colour1($colour);
shows an immense lack of understanding the basics of php.
And therefore: Please indent and format your code properly and take some basic php tutorials.
Posted: Thu Jul 05, 2007 4:40 am
by ghadacr
HAHAHAHAHA
Got it working without your help:
Cheers to my lack of understanding
A little tip Volka, please dont be so rude... People only come on to these boards for help, not more fights:!:
Although i do give credit where it is due, and your skilled in PHP, but just be a little humane at times and not so confrontational....
Actually thats being a bit Hypercritical.... So i do apologise for that outburst just above....
Code: Select all
while ($row = mssql_fetch_array($result))
{
$colour1="yellow";
$colour2="blue";
if($row['Confirmed' ] == 1) {
echo $colour = $colour1;
}
else{
echo $colour = $colour2;
}
echo '<tr bgcolor='. $colour .'>';
echo '<td>' . $row['HotelName' ] . '</td>';
echo '<td>' . $row['RoomType' ] . '</td>';
echo '<td>' . $row['AvailableFrom' ] . '</td>';
echo '<td>' . $row['AvailableTo' ] . '</td>';
echo '<td><input type="hidden" name="datefrom" value="' . $datefrom . '" />' . $datefrom .'</td>';
echo '<td><input type="hidden" name="dateto" value="' . $dateto . '" />' . $dateto .'</td>';
echo '<td>' . $row['Notes' ] . '</td>';
if ($row['Confirmed' ] == 1) {
echo '<td><a href="roomdetails.php?HotelRoomID=' . $row['HotelRoomID'] . '">This room has been confirmed, select for more information</a></td>'; }
else {
echo '<td><input type="checkbox" name="HotelRoomID[]" value="' . $row['HotelRoomID'] . '" />Select ' . $row['RoomType'] .' to update</td>';
}
echo '</tr>';
}
Posted: Thu Jul 05, 2007 4:57 am
by volka
me beeing rude. rofl.
Believe me, you don't want me to be candid with you.
But lucky you, I will not insult you anymore because I have enough of it and will stay away from your threads. Good luck.
Posted: Thu Jul 05, 2007 5:08 am
by ghadacr
Posted: Thu Jul 05, 2007 10:26 am
by superdezign
Volka is possibly the most helpful member here. The only thing is that he'll give suggestions, and then the poster won't take them, and then wonders why nothing is working. Most of us would simply give up on you after you blatantly ignore our advice more than once, but volka keeps trying until you get it.
And I think the whole board agrees that basic tutorials will do you good. We don't really teach, we guide. Everything we say implies a basic understanding of the language, semantics, and mechanics.
I came here with a basic understanding, and being here has refined that into much more. Just learn some more, participate in the forums, and don't be so easily offended. We're all new at some point.
Posted: Sun Jul 08, 2007 11:47 am
by ghadacr
Ok....Point taken