Datensatz-Auswahl per radio button

Li will Lion

Grünschnabel
sers,

ich habe folgendes problem :
ich will aus einer liste mit datensatz-einträgen einen per radio-button auswählen und per submit-button zu einer weiteren php-seite gelangen, auf der ich den ausgewählten eintrag in einem formular bearbeiten kann.
die vorgehensweise ist mir soweit klar, aber irgendwie wird die vom radio-button ausgegebene variable nicht übermittelt.
ich erhalte immer die ausgabe 'no entry selected'.

vielen dank im voraus

die Auswahlseite:
PHP:
<form action="news_edit_do.php" method="post">
<table WIDTH=600 BORDER=0 CELLPADDING=0 CELLSPACING=0>
  <tr> 
    <td width="17"> <img SRC="img/ad_frame_01.gif" WIDTH=10 HEIGHT=435 ALT=""></td>
    <td width="573" align="center" valign="bottom"> 
      <div id="listnews" style="position:absolute; width:550px; height:406px; z-index:1; overflow: auto; left: 18px; top: 4px;"> 
        <?php
		$db = mysql_pconnect();
		$res = mysql_db_query("kiesgrube" , "select * from news") or die(mysql_error());
		$num = mysql_num_rows($res);
		
		echo "<p><font class=style><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif><strong>$num Einträge:</strong></font><br>";
		
		for ($i=0; $i<$num; $i++)
		{
			$date = mysql_result($res, $i, "datum");
			$title = mysql_result($res, $i, "titel");
			$text = mysql_result($res, $i, "text");
			$nr = $i+1;
			echo "
				<table width=500 class=table border=1>
				<tr>
				<td rowspan=3 class=style><input name='select' type='radio' class='style' value='$date'></td>
				<td width=70 class=style><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif><strong>No.$nr</strong></font></td>
				<td align=right class=style><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif><strong>$date</strong></font></td>
				</tr><tr>
				<td class=style><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif><strong>Titel</strong></font></td>
				<td class=style><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif><strong>$title</strong></font></td>
				</tr><tr>
				<td valign=top class=style><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif><strong>Text</strong></font></td>
				<td class=style><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif><strong>$text</strong></font> </td></tr>
				</table><p>
				";
		}
		mysql_close($db);
		?>
          
        </div>
      <table border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><input type="submit" value="Edit selected entry" class="style"></td>
      </table>
      </td>
    <td width="10"> <img SRC="img/ad_frame_03.gif" WIDTH=10 HEIGHT=435 ALT=""></td>
  </tr>
  <tr> 
    <td COLSPAN=4> <img SRC="img/ad_frame_04.gif" WIDTH=600 HEIGHT=12 ALT=""></td>
  </tr>
</table>
  </form>

die Edit-seite:

PHP:
<form action="news_edit_done.php" method="post">
<table WIDTH=600 BORDER=0 CELLPADDING=0 CELLSPACING=0>
  <tr> 
    <td width="17"> <img SRC="img/ad_frame_01.gif" WIDTH=10 HEIGHT=435 ALT=""></td>
    <td width="573" align="center" valign="bottom"> 
      <div id="listnews" style="position:absolute; width:550px; height:406px; z-index:1; overflow: auto; left: 18px; top: 4px;"> 
        <?php
		if ($select)
		{
		$db = mysql_pconnect();
		
		$sqlab = "select * from news where";
		$sqlab .= " datum = $select";
		
		$res = mysql_db_query("kiesgrube" , $sqlab) or die(mysql_error());
		
		$newtitle = mysqlresult($res, 0, "title");
		$newtext = mysqlresult($res, 0, "text");
		$date = mysql_result($res, 0, "datum");
			
		echo "<p><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif class=style><strong>Edit entry from $date and save</strong></font> <br>";
		echo "<form action = news_edit_done.php method= post>";
		
		echo "<input name=uptitle value=$newtitle><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif class=style><strong>Title</strong></font>";
		echo "<input name=uptext value=$newtext><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif class=style><strong>Text</strong></font>";
		echo "<input type=submit value=Save><p>";
		mysql_close($db);
		}
		else
		echo "<p><font color=#B5E1B5 size=2 face=Arial, Helvetica, sans-serif class=style><strong>No entry selected</strong></font><p>";
		?>
        </div>
        </td>
    <td width="10"> <img SRC="img/ad_frame_03.gif" WIDTH=10 HEIGHT=435 ALT=""></td>
  </tr>
  <tr> 
    <td COLSPAN=4> <img SRC="img/ad_frame_04.gif" WIDTH=600 HEIGHT=12 ALT=""></td>
  </tr>
</table>
</form>
 
Zurück