I am fairly new to PHP and MySQL and I have a problem which I have been trying to resolve for days. I just can't figure it out and can't find anything on the web that is helping me work it out.
I hope someone out there can assist.
Ultimately I want to display the data as follows (this is just an example of how I want it displayed, it does not mirror the data set below)...
<h2><a href="procedure.php?number=f1>Finance Procedure 1 - F1</a></h2>
<ul>
<li><a href="form/f1_fm1.pdf" target="blank">Finance Form 1</a></li>
<li><a href="form/f1_fm2.pdf" target="blank">Finance Form 2</a></li>
<li><a href="form/f1_fm3.pdf" target="blank">Finance Form 3</a></li>
</ul>
<h2><a href="procedure.php?number=f2>Finance Procedure 2 - F2</a></h2>
<ul>
<li><a href="form/f2_fm1.pdf" target="blank">Finance Form 1</a></li>
<li><a href="form/f2_fm2.pdf" target="blank">Finance Form 2</a></li>
<li><a href="form/f2_fm3.pdf" target="blank">Finance Form 3</a></li>
</ul>
<h2><a href="procedure.php?number=f3>Finance Procedure 3 - F3</a></h2>
<ul>
<li><a href="form/f3_fm1.pdf" target="blank">Finance Form 1</a></li>
<li><a href="form/f3_fm2.pdf" target="blank">Finance Form 2</a></li>
<li><a href="form/f3_fm2.pdf" target="blank">Finance Form 3</a></li>
</ul>
I have 2 tables (procedure_name and procedure_form). and run the following query which gives me the required data set.
$sql = "SELECT procedure_info.id, procedure_info.name, procedure_info.number, procedure_form.form, procedure_form.form_file
FROM procedure_info
LEFT JOIN procedure_form ON ( procedure_info.id = procedure_form.name_id )
WHERE procedure_info.procedure_area = '14'
ORDER BY procedure_info.procedure_area ASC";
My problem is that I don't know how to output the result set I achieve into the exampled display. my data set looks like this.
id ---name ------------------------------number --form ---------------------form_file
33 ---Referral ---------------------------E2E1 ----NULL ----------------------NULL
34 ---Employer led E2E referral -----------E2E1a ---NULL ----------------------NULL
35 ---Centre Start & Induction -----------E2E2 ----NULL ----------------------NULL
39 ---Programme activity plan & review ---E2E4 ----NULL ----------------------NULL
38 ---Inital Assessment ------------------E2E3 ----Additional Information ------e2e2_fm4.pdf
38 ---Inital Assessment ------------------E2E3 ----E2E Weekly Batch Header ---mi1_fm2.pdf
40 ---Placement -------------------------E2E5 ----NULL ----------------------NULL
41 ---E2E Health & Safety review ---------E2E5a ---NULL ----------------------NULL
42 ---E2E Health & Safety Monitoring -----E2E5b ---NULL ----------------------NULL
43 ---E2E Basic skills ---------------------E2E6 ----NULL ------------------------NULL
44 ---Leavers ----------------------------E2E7 ----NULL ----------------------NULL
I think I have to put this data into a multidimensional array but I just can not work it out.
Can anyone help me? PLEASE!!!
Progress bar for webpage
Hi,I want to implement a progress/waiting bar on my webpage - exactly the same thing that the Microsoft Update web page uses when your PC is being searched for available updates (the green bar that
help with image upload code
Hello,right now this code I have resizes images and then places them into the uploads folder is there a way to make this code upload the orignal file sizes into uploads and make it put the smaller
Simple PHP/Java Help..
Hi,I'm trying to build a little program to do with calculating postage. Unfortunately i haven't got a very good idea of how to use PHP, Java, or any other languages - apart from CSS and HTML -_-. If
records between 2 dates
Hello all,
timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing the page.I found this code (i didn't write it) which works to load images but does not switch them
Effort Estimation Template for Steady State Support
Hi Everyone,
PHP Multiples of 2, Show posts...not working (wordpress)
I have been using this code to show div.example with 6 li columns inside it, each li is a post with its info inside.Once it gets to the 6th li it closes the div.example and starts a new one. This to
validating url
im trying to validate url's sent to me by a formthe url's im collecting are for placing banners on my site so the url's are the link to there site and url of where there banner isURL's ARE BROKEN INTO
ECC6 - Single sign-on
We are in the process of upgrading to ECC 6 which will support single sign on with user passwords aligned by our active directory to the same as those used to access the Network. My query is that we
how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a sessionCode: <?phpinclude_once 'Connect.php';if (!is_authed()) { die ('You are not