Here's the input in that will not work. The value shows up correctly in view source, but when I try to redeem the item, it comes up as an undefined index. The variable $row[3] is part of a different while loop. (which is still going)
Code: Select all
echo "<input type='hidden' name='aucid' value='$row[3]' />";
Code: Select all
echo "<form action='market.php' method='post'>";
echo "<select name='charname'>";
$chars="SELECT `charname` FROM `characters` WHERE `pid`='$pid'";
if ($chars2=mysqli_query($db,$chars))
{
while($row1 = mysqli_fetch_row($chars2))
{
echo "<option value='$row1[0]'>$row1[0]</option>";
}
}
echo "</select>";
echo "<input type='hidden' name='aucid' value='$row[3]' />";
echo "<input type='submit' name='redeem' value='Redeem' />";
echo "</form>";
Code: Select all
if (isset($_POST['redeem']))
{
$aucid=(int)$_POST['aucid'];
$aucinfo="SELECT `cbid`,`highbid`,`aucend`,`bought` FROM `playermarket` WHERE `aucid`='$aucid'";
$aucinfo2=mysqli_query($db,$aucinfo) or die(mysqli_error($db));
$aucinfo3=mysqli_fetch_array($aucinfo2);
}