I need help with this php code i have no experience in php so i resorted to here. when i click show all tickets on my webpage it only shows tickets of the last person who signed up and not everyone
[php]
function SeeAllTheTickets() {
if ($_REQUEST[pcc] == ‘’) { $pcc = ‘0’; } else { $pcc = $_REQUEST[pcc]; }
?>
Showing All Tickets on the Database
Owner Info |
Ticket Number |
Bought On |
<?php
$mysql = mysql_query("SELECT owner_mnum FROM ".MYSQL_PREFIX."_tickets WHERE active='1'");
while ($t = @mysql_fetch_array($mysql)) { $ab = $t[owner_mnum]; $mnums[$ab] = 'a'; }
foreach ($mnums as $mnum => $trash) {
$mysql = mysql_query("SELECT * FROM ".MYSQL_PREFIX."_members WHERE mnum='$mnum'");
while ($a = @mysql_fetch_array($mysql)) { $num = $a[mnum]; $real_mnums[$num] = $a[first]." ".$a[last]." (".$a[email].")"; }
}
$mysql = mysql_query("SELECT * FROM `".MYSQL_PREFIX."_tickets` WHERE `owner_mnum`='$mnum' ORDER BY `time_stamp` ASC");
$count = @mysql_num_rows($mysql); if ($count > MAX_RESULTS) { $limit = " LIMIT ".$pcc.",".MAX_RESULTS; } else { $limit = ''; }
$mysql = mysql_query("SELECT * FROM `".MYSQL_PREFIX."_tickets` WHERE `owner_mnum`='$mnum' ORDER BY `time_stamp` ASC$limit");
while ($t = @mysql_fetch_array($mysql)) {
?>
<?php $nm = $t[owner_mnum]; echo $real_mnums[$nm]; ?> |
<?php echo $t[tnum] ?> |
<?php echo $t[thedate].' at '.$t[thetime] ?> |
<?php if ($t[paypal_txn]) { ?>PayPal Transaction #<?php echo $t[paypal_txn] ?>
<?php } ?>Delete Ticket
|
|
<?php
$shown++; }
[/php]