Hmmm, I can’t understand what is wrong here.
The following code is listing my data on the screen (as a test), but it’s not updating the random code to my db. Why not?
<?php do { ?>
<?php
//Random code generator
$obj3 = new Random(false, true, true);
$randcode = $obj3->get(8);
$idnr = ($row_rs_test['test_id']);
mysql_query("UPDATE test SET random = $randcode
WHERE test_id = $idnr");
echo $row_rs_test['station']; ?> | <?php echo $randcode; ?><br />
<?php } while ($row_rs_test = mysql_fetch_assoc($rs_test)); ?>