Im missing something, Please help!

This is the view of the events (basic) Can I do the if/else statement to chose font color base of a MySQL Query Result? (see below) And
No matter how I have written this, it will not turn into a scrolling table. I want the headers to stay fixed. I also don’t want to rely on Java-most of the staff logs in mobile. I will if I have to though!

The other thing I am not seeing how to do, but I know is also possible… having an “edit event” “view positions” buttons. I am thinking it has to do with storing a variable, but how do you make sure the variables code pulls the event singularly from your query using the Event_ID ??

This is my first site outside of an HTML site. This is the raw synopsis:

Building a site that has users with profiles & 6 permission levels. Client & various staffing levels; I use php to code the access because it is not so much about being able to query/change the database-its more so I am handling with php. There is a time log, and keeps up with the pay to the staff and what the client owes per their hours. This is the first layer view once logged in as any staffmember (sans the edit event which is reserved for high perm staff) upon clicking “view positions” they need to be able to request the shift (separate table-please correct me if I am wrong-I have all foreign keys in database in place so making this event table should be along the same as all the others but with diff variables/queries etc. So in theory all I have to do is get the grabbing of the ID field and using it down)

Here is my code. Why is it not setting the client named in green? :frowning:
Why wouldn’t overflow: auto/scroll, NOR Javascript make the table scroll? :o
Can I store a variable in each row (ex $editevent) in my database, called by mysql_query(SELECT * FROM ALM_EventsORDER BY EventDate DESC LIMIT 40) & define it in config.php to request the event through a $_POST? If so, Im stuck there-get the concept…maybeee…but not sure how to execute it. This Page is used in adminspage.php / managerspage.php / staffpage.php / alinesstaffpage.php / alinesmagagers.php with <?php include('viewevents.php'); ?> To get there you must log in through a hopefully tight login, carrying the sessions through authorize.php, which takes you to the secondary index(only named that way for my benefit) and the “anminspage.php” is used by <?php include('adminspage.php');?> also. :o
Thank you in advance for any advice!!

<?php require_once('authorize.php'); ?> <?php $sql = "SELECT * FROM Events ORDER BY EventDate DESC LIMIT 40"; $sqlRes = mysql_query($sql); $req1 = mysql_num_rows($sqlRes); $colorpick = $sqlRes['BusinessName'];?>
<?php $i=0; while ($i < $req1) { $f1=mysql_result($sqlRes,$i,"EventDate"); $f2=mysql_result($sqlRes,$i,"EventName"); $f3=mysql_result($sqlRes,$i,"Hour"); $f4=mysql_result($sqlRes,$i,"EndHour"); $f5=mysql_result($sqlRes,$i,"BusinessName"); ?> <?php $i++; } ?>
Event Date Event Name Start Time End Time Client Name
<?php echo $f1; ?> <?php echo $f2; ?> <?php echo $f3; ?> <?php echo $f4; ?> <?php if($colorpick == 'ClientA') { ?> <?php echo $f5; ?>; <?php } else($colorpick != 'ClientA'); ?> <?php echo $f5; ?>
Sponsor our Newsletter | Privacy Policy | Terms of Service