Jump to content

[SOLVED] Quaries, Posting , and more Ohh my!


Zepo.

Recommended Posts

Ok i have a loop going on with a post in each one but im not sure how to take data from the loop into the posted page.

Help would be greatly apprreciated.

 

 

Heres the code.

 

$match=mysql_query("SELECT id,posted,ladder,mid,wid,lid,refs,details FROM matchreports");
while(list($ids,$posted,$ladder,$mid,$wid,$lid,$refs,$details)=mysql_fetch_row($match)){

$account++;

$refs = str_replace ('>', '&#39', $refs);
$details = str_replace ('>', '&#39', $details);

echo"
<tr valign='top'>
<form method='post'>
<td class='optiontitle' colspan='2'><div>ID: $ids | Posted By: $posted | Ladder: $ladder | Match ID: $mid | Losser ID: $lid | Referees Present : $refs </div></td>
</tr>
<tbody id='tbody_keywords'>
<tr valign='top'>
<td class='alt1'><div class='smallfont' align='center'>
$details
</td><td class='alt1' width='5%' align='center'>
<input type='hidden' name='act' value='deleterefticket'>
<input type='image' src='./images/delete.png' name='submit'>
</form></td>
</tr>
";
}

Link to comment
https://forums.phpfreaks.com/topic/72039-solved-quaries-posting-and-more-ohh-my/
Share on other sites

Sorry for the double post, but its still not sending the data.

 

$matches = mysql_query("SELECT id,posted,ladder,mid,wid,lid,refs,details FROM matchreports");
while ($match = mysql_fetch_array($matches)){

$account++;

$refs = str_replace ('>', '&#39', $refs);
$details = str_replace ('>', '&#39', $details);

echo"
<tr valign='top'>
<form method='post'>
<td class='optiontitle' colspan='2'><div>ID: $match[id] | Posted By: $match[posted] | Ladder: $match[ladder] | Match ID: $match[mid] | Losser ID: $match[lid] | Referees Present : $match[refs] </div></td>
</tr>
<tbody id='tbody_keywords'>
<tr valign='top'>
<td class='alt1'><div class='smallfont' align='center'>
$match[details]
</td><td class='alt1' width='5%' align='center'>
<input type='hidden' name='act' value='deleterefticket'>
<input type='image' src='./images/delete.png' name='submit'>
</form></td>
</tr>
";
}

 

Goes to

 

function reportdelete($match){
global $config;

mysql_query("DELETE FROM `matchreports` WHERE `id`='$match[id]'");

echo"
<body style='margin:0px'>
<div style='margin:10px'>

<br />
<form method='post'>
<table cellpadding='4' cellspacing='0' border='0' align='center' width='95%' class='tborder' id='optionsform'>
<colgroup span='2'>
<col style='width:45%'></col>
<col style='width:55%'></col>
</colgroup>
<tr>
<td class='tcat' align='center' colspan='2'>
<b>Report Manager</b>
</td>
</tr>
<tr valign='top'>
<td class='optiontitle' colspan='2'><div>Deleted</div></td>
</tr>
<tbody id='tbody_keywords'>
<tr valign='top'>
<td class='alt1'><div class='smallfont' align='center'>
Deleted report ID: $match[id], Originally posted by $match[posted].
</td>
</tr>
</tbody>
</table>";

$adminlog[admin]="{$_SESSION['name']}";
$adminlog[details]="[Deleted Report]: ID: $match[id] Posted By: $match[posted]";
adminlog($adminlog);

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.