I have a database of invoices that have multiple attachments(which are stored in a different table) per each invoice. I have it returning the row of invoices just fine. But now I want a way to click the "view" link to call a php script to open up a jquery dialog box that will display all the attachments for that specific invoice number. The attachments are tied to the invoices thorugh the "invoice_num". I am VERY VERY VERY new to the jquery/ajax world, and really don't even know where to start. So any help is appreciated. Here is what I'm working with so far:
***NOTICE the bold is the link that i want the onclick function on.***
<?php
$conn = mysql_connect('xxx','hoovdash','xxx');
$db = mysql_select_db('xxx',$conn);
$sql = "SELECT * FROM invoices WHERE on_hold='1' ORDER BY create_date";
$result = mysql_query($sql,$conn);
while($row = mysql_fetch_assoc($result))
{
$id = $row['id'];
$equip_num = $row['equip_num'];
$invoice_num = $row['invoice_num'];
$notes = $row['notes'];
echo"<tr><td class='$row_class'>$equip_num</td><td class='$row_class'>$invoice_num</td><td class='$row_class'>$notes</td><td class='$row_class' style='text-align:center;'>[B]<a style='margin-right:20px; font-weight:bold;' href=\"/invoices/view/?id=".$id."&equip_num=".$invoice_num."\">View</a>[/B]</tr>";
}
?>