Hello,
can someone help me with this? Brain dead now basically...been coding 5 hours...starting to feel my brain going bzzt..anyway...
I have a problem here. The first printf code is to list the database data onto a table. The second printf code is for the task which is Delete, Update, Find. But as you can see I can only list one (delete) because the <a href=\"%s?ticket=%s&delete=yes\"> refers to PHP_SELF, $myrow[0]. If i add a delete link it will give me an error because it has no reference. So i put the update link on top (first printf).
if ($HTTP_POST_VARS["problemarea"]=="email")
{
$result = mysql_query("SELECT * FROM callcenter WHERE problemarea = 'email'",$db);
while ($myrow = mysql_fetch_row($result))
{
printf("<tr><td valign=\"top\">%s</td><td valign=\"top\">%s</td><td valign=\"top\">%s</td><td valign=\"top\">%s</td><td valign=\"top\">%s</td><td valign=\"top\">%s / %s / %s</td><td valign=\"top\"><a href=\"update.php\">U</a></td></tr>\n", $myrow[0], $myrow[1], $myrow[2], $myrow[3], $myrow[5], $myrow[6], $myrow[7], $myrow[8]);
printf("<tr><td valign=\"top\" colspan=7 align=\"right\"><a href=\"%s?ticket=%s&delete=yes\">D</a></td></tr>\n", $PHP_SELF, $myrow[0]);
}
}
I want to put a delete link, find link and update link in the first printf syntax. I tried putting the links on the first printf command but that doesn't work either. Is there anyway to do that?
hopefully someone can understand what i'm saying.
thanks.