Jump to content

fire department tracking code


rwslippey

Recommended Posts

Hello all... Appologies on the subject line.. really couldn't come up with an idea their.

 

I'm stuck in a rut here on this... Basicly I am trying to write some code to track our volunteer fire company's member response (tracked for informational perposes as well as some regulatory reasons)...

I created a database with all of out members... each member has an assosiated member number which is currently used in the db and in our current tracking system (papper, pen, 6 hours of manually modifying an excel sheet on a monthly basis)...

 

What I am trying to do is query the DB and dump out the entire table of members.. (that was easy)

 

What I want to do is display the member's name (currently stored as a variable $name) in an organized fashion...with a check box next to the name

 

soemthing like this  (cb=checkbox)

 

CB  Member name    CB Member Name  CB Member name  CB Member name

CB  Member Name    CB Member Name  CB Member name  CB Member name

 

and so on down the page.. what I'm getting now is a list one on each line witht the check boxes...

 

I have tryed a table to no avail....

 

I know how to code these into html the way I want but that would require changing my php code every time we add or remove a member from our roster....(trying to avoid that by having the code pull this info out of the db...

 

Thanks for all the help in advance... 

 

Here's what I currently have coded so far (for this section)

 

while($row = mysql_fetch_array( $result )) {

 

$f_name=$row['f_name'];

$l_name=$row['l_name'];

$number=$row['number'];

 

$name="$f_name $l_name";

$value="$l_name$number";

 

echo "<input type=checkbox name=$name value=$value />";echo $name;

}

?>

 

I want to use the valuie (name and number combinded  to query the db later to add their presence to the DB)...

 

Thanks again

 

Rob :confused:

Link to comment
https://forums.phpfreaks.com/topic/179756-fire-department-tracking-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.