I get the following printed values
ID: I123, Rating: 4
ID: I124, Rating: 3
ID: I125, Rating: 5
ID: I126, Rating: 1
ID: I127, Rating: 0
ID: I128, Rating: 5
ID: I129, Rating: 0
ID: I130, Rating: 0
ID: I131, Rating: 0
ID: I132, Rating: 0
ID: I133, Rating: 0
ID: I134, Rating: 0
ID: I135, Rating: 0
ID: I136, Rating: 0
ID: I137, Rating: 0
ID: I142, Rating: 0
I can't get them in my selectboxes. That's my whole problem.
My complete code is:
<?
session_start();
include('connect.php');
$link = dbconnect();
$arr = "". $_SESSION["illustrations"];
$array = explode(";",$arr);
$iv = explode(":",$array[$i]);
for($i=0; $i < count($array); $i++)
{
$iv = explode(":",$array[$i]);
$idnumber[$i] = $iv[$i][0];
echo $iv[1];
}
for($i=0; $i < count($array); $i++){
$iv[$i] = explode(':', trim($array[$i]));
$idnumber[$i] = $iv[$i][0];
$idvalue[$i] = $iv[$i][1];
echo 'ID: ' . $idnumber[$i] . ', Rating: ' . $idvalue[$i] . '<br />' . "\n";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
<meta name="generator" content="Adobe GoLive 6">
<title>Hipidee</title>
<link href="hipidee.css" rel="stylesheet" media="screen">
</head>
<body background="../gfx/bgbloem.gif" bgcolor="#ffffff" leftmargin="30" marginheight="30" marginwidth="30" topmargin="30">
<table width="480" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>
<form action="stap5_basic.php" method="post" name="FormName">
<img src="../gfx/titel_stap4.gif" alt="" height="43" width="470" border="0"><b><br>
<span class="tekst">Kies maximaal 5 illustraties. Geef de illustraties een </span><span class="tekst"><b>cijfer van 1 tot 5</b></span><b><span class="tekst">,<b> waarin cijfer <b>5</b> de </span></b><span class="tekst"><b>meest favoriete illustratie</span><span class="tekst"> <b>is. </b><br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
$query = "SELECT illustrations_id, filename FROM binary_data WHERE style_id=1";
$result = @($query);
if($result)
{
while ($row = mysql_fetch_array($result))
{
echo "<tr><td><img src=\"../stijlen/".$row["filename"]."\"><td>"."</td></tr></table></td><table></tr>\n";
echo "<tr><td><select name=\"I".$row["illustrations_id"]."\" size=\"1\">";
echo $idvalue[$i];
for($i=0; $i<6; $i++)
{
if( in_array("I".$row["illustrations_id"], $idvalue[$i] ) ) echo " selected";
if( in_array("I".$row["illustrations_id"], $idvalue ) ) echo " selected";
for($i=0; $i<6; $i++)
{
if( in_array("I".$row["illustrations_id"], $idvalue[$i] ) ) echo " checked";
echo "<option value='$i' $i>$i</option>";
}
}
}
}
?>
<tr>
<td><a href="stap3_basic.php"><img src="../gfx/knop_terug.gif" alt="" height="28" width="25" border="0"></a></td>
<td></td>
<td></td>
<td>
<div align="right">
<br>
<br><td>
<img src="../gfx/knop_vooruit.gif" alt="" height="28" width="25" border="0" onclick="submit();" style="cursor:hand;"></div></td>
</td>
</tr>
</table>
</span></b>
</form>
</b></td>
</tr>
</table>
</body>
</html>
<?
mysql_close($link);
?>
Somebody know's the problem?
Thank's
Sander