zsxdcfv21 Posted August 30, 2006 Share Posted August 30, 2006 everytime i visit my link, for example this kind of URL http://www.mywebsitehere.com/app/buyer.php?action=notes&BuyerID=1068case 'notes': $q = " SELECT n.BuyerNoteID, n.Note, date_format(n.Created, '%d %b %y') nCreated, date_format(n.Created, '%d %b %y') nModified FROM BuyerNote n JOIN Buyer b ON b.BuyerID = n.BuyerID AND b.BuyerID = '{$_GET['BuyerID']}' JOIN User u ON b.UserID = u.UserID "; if (!$isAdmin) $q .= " AND u.UserID = '{$_SESSION['UserID']}' "; $q .=" ORDER BY n.Created DESC"; $db->execute($q); if ( true == $db->resultHasRows() ) { require_once('func.buyernote.php'); $notes = ''; while ( false != ($r = $db->getObject()) ) { $notes .= makeNote($r->BuyerNoteID, nl2br($r->Note), $r->nCreated, $r->nModified); } } else { $notes = 'No Notes to Display.'; } $o = $db->executeOrDie(" select concat(Firstname, ' ', Surname) Name from Buyer where BuyerID = '{$_GET['BuyerID']}' "); // alterted this 18 august if (!$isSubAdmin) $html->setAction("note_add&BuyerID=".$_GET['BuyerID'], 'Add a Note'); $html->setHeading('View Notes for ' . $o->Name); $html->bindContent($notes); $html->useBackButton($_SERVER['PHP_SELF']); $html->printHTML(); $html->serialise(); break;... it gives me a blank. no errors or whatsoever, its purely blank. the script for 'func.buyernote.php' are the ff:<?function makeNote ($id, $note, $created) { global $isSubAdmin; $note = <<<endh <table class="note"> <tr> <td valign="top" width="75" class="date"><b>$created</b></td> <td valign="top" class="text" rowspan="2">$note</td> </tr> <tr> <td valign="bottom">endh; if ( ! $isSubAdmin ) { $note .= <<<endh<a href="buyer.php?action=note_edit&BuyerNoteID=$id">Edit</a> |<a href="buyer.php?action=note_remove&BuyerNoteID=$id">Delete</a>endh; } $note .= "</td></tr></table><br>"; return $note;}?>can anyone tell me whats wrong??? =( Quote Link to comment Share on other sites More sharing options...
Jenk Posted August 30, 2006 Share Posted August 30, 2006 Turn all error reporting on [code=php:0]<?php error_reporting(E_ALL); ini_set('display_errors', 'On'); ?>[/code] and see what you get. Quote Link to comment Share on other sites More sharing options...
AdRock Posted August 30, 2006 Share Posted August 30, 2006 Try chnaging this[code]date_format(n.Created, '%d %b %y') nCreated,date_format(n.Created, '%d %b %y') nModified[/code]to this[code]date_format(n.Created, '%d %b %y') as nCreated,date_format(n.Created, '%d %b %y') as nModified[/code]I had to do this for a date I was using to format it how i wanted Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.