Witam zrobiłem formularz kontaktowy który po wysłaniu zapisuje dane do bazy danych
Następnie zrobiłem skrzynkę odbiorczą i tam pokazuje wiadomości jedna pod 2-gą i po kliknięciu na wybraną wiadomość przycisk pokaż pokazuje 1-szą wiadomość poprawnie a jak kliknę wiadomość następną wyświetla tę samą wiadomość którą otworzyłem wcześniej i nie wiem o co chodzi

Może tu znajdę jakieś pomocne podpowiedzi jak to zrobić

Dodam, że usuwa poprawne id wiadomości
PLIK ODBIORCZA.PHP<?php require_once('../Connections/config.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
}
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ?
doubleval($theValue) : "NULL"; break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$query_rsreklamacja = "SELECT reklamacja.wiad_id, reklamacja.nr_nadania, reklamacja.`data`, reklamacja.tem_wiad FROM reklamacja WHERE reklamacja.`data` ORDER BY reklamacja.`data` DESC";
?>
<?
include '../config.php';
if(!$_SESSION['user']['Login']){header('location: login.php');exit
;} ?>
Wyświetlanie wiadomości jedna pod drugą
<p><table width="0" border="0" id="tbl_repeat">
<tr>
<th scope="col">Nr Nadania</th>
<th scope="col">Temat Wiadomości</th>
<th scope="col" style="width:15%">Data Wiadomości</th>
<th scope="col" style="width:10%">Pokaż </th>
</tr>
<?php do { ?>
<tr>
<td>
<?php echo $row_rsreklamacja['nr_nadania']; ?></td>
<td>
<?php echo $_tem_wiad[$row_rsreklamacja['tem_wiad']]; ?></td>
<td>
<?php echo $row_rsreklamacja['data']; ?></td>
<td><a href="pokaz.php?id=
<?php echo $row_rsreklamacja['wiad_id']; ?>"><input name="" type="button" value="Pokaż"></a></td>
</tr>
</table>
PLIK POKAŻ.PHP<?php require_once('../Connections/config.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
}
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ?
doubleval($theValue) : "NULL"; break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$query_Recordset1 = "SELECT reklamacja.wiad_id, reklamacja.nr_nadania, reklamacja.imie_rekl, reklamacja.nazwisko_rekl, reklamacja.ulica_rekl, reklamacja.kod_poczt_rekl, reklamacja.miasto_rekl, reklamacja.tel_rekl, reklamacja.mail, reklamacja.`data`, reklamacja.tresc, reklamacja.tem_wiad FROM reklamacja";
$totalRows_Recordset1 = mysql_num_rows($Recordset1);mysql_select_db
($database_config, $config); $query_Recordset1 = "SELECT reklamacja.wiad_id, reklamacja.nr_nadania, reklamacja.imie_rekl, reklamacja.nazwisko_rekl, reklamacja.ulica_rekl, reklamacja.kod_poczt_rekl, reklamacja.miasto_rekl, reklamacja.tel_rekl, reklamacja.mail, reklamacja.`data`, reklamacja.tresc, reklamacja.tem_wiad FROM reklamacja ORDER BY reklamacja.`data` DESC";
?>
<?
include '../config.php';
if(!$_SESSION['user']['Login']){header('location: login.php');exit
;} ?>
Część dalsza która pokazuje wiadomość
<table width="77%" border="0" >
<tr>
<th width="27%" scope="row">Nr Nadania:</th>
<td width="73%">
<?php echo $row_Recordset1['nr_nadania']; ?></td>
</tr>
<tr>
<th scope="row">Imie :</th>
<td>
<?php echo $row_Recordset1['imie_rekl']; ?></td>
</tr>
<tr>
<th scope="row">Nazwisko:</th>
<td>
<?php echo $row_Recordset1['nazwisko_rekl']; ?></td>
</tr>
<tr>
<th scope="row">Ulica:</th>
<td>
<?php echo $row_Recordset1['ulica_rekl']; ?></td>
</tr>
<tr>
<th scope="row">Kod Pocztowy:</th>
<td>
<?php echo $row_Recordset1['kod_poczt_rekl']; ?></td>
</tr>
<tr>
<th scope="row">Miasto:</th>
<td>
<?php echo $row_Recordset1['miasto_rekl']; ?></td>
</tr>
<tr>
<th scope="row">Telefon:</th>
<td>
<?php echo $row_Recordset1['tel_rekl']; ?></td>
</tr>
<tr>
<th scope="row">E-mail:</th>
<td><a href="mailto:
<?php echo $row_Recordset1['mail']; ?>">
<?php echo $row_Recordset1['mail']; ?></td>
</tr>
<tr>
<th scope="row">Data Wiadomości:</th>
<td>
<?php echo $row_Recordset1['data']; ?></td>
</tr>
<tr>
<th scope="row">Temat Wiadomości:</th>
<td>
<?php echo $_tem_wiad[$row_Recordset1['tem_wiad']]; ?></td>
</tr>
<tr>
<th scope="row">Wiadomość:</th>
<td>
<?php echo $row_Recordset1['tresc']; ?></td>
</tr>
<tr>
<th scope="row"> </th>
<td style="width:-20%; text-align: center;"><a href="usun.php?id=
<?php echo $row_Recordset1['wiad_id']; ?>">Usuń Wiadomość</a></td>
</tr>
</table>
Dziękuję za wszelkie podpowiedzi