I'm looking for a little advice concerning a table I'm trying to build.
For each one of our warehouses that I pull from a database, I need to create a table cell for the month. Inside the table cell, I need to check to see if a specific document exists, and if not, give the ability to upload a document.
The trouble I'm having seems to be with the filename.
I've ran my query, created a row for each warehouse, but in the next cell, I'm not sure how to get it to change months as the row progress.
If at all possible, I'm trying to avoid having to create a new table to hold the document links and information. I'd rather do this purely using PHP with the exception of pulling the warehouse locations.
My code is below and an image of what I'm trying to achieve is attached.
$sql = "SELECT branch, branchname FROM dw_location WHERE hidden = '0' and branch <> '90'";
$res = mysql_query($sql) or die(mysql_error());
You just need to do the same loop for each warehouse and then use some logic to check to see if the documents exist for each warehouse for each month. Then fill in each cell appropriately...
You can use the double dollar sign to call variable variable names. Or if your variable is a global variable, you can access it through the $_GLOBALS array.
Open in new window
You just need to do the same loop for each warehouse and then use some logic to check to see if the documents exist for each warehouse for each month. Then fill in each cell appropriately...