The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.34 / 5.00 31,296 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.07 / 5.00 10,082 ViewsI'm having trouble inserting data into a table:
function genRandomString() {
$length = 10;
$characters = "0123456789abcdefghijklmnopqrstuvwxyz";
for ($p = 0; $p < $length; $p++) {
$string .= $characters[mt_rand(0, strlen($characters))];
}
return $string;
}
genRandomString();
mysql_select_db("DATABASE", $con);
$sql = "INSERT INTO hits VALUES ('3', " . $string . ")";
mysql_query($sql);
Why doesn't this insert the data into the table?
I love xbox live and I like flash games too!
At 10/6/09 07:53 PM, yoyobebob wrote: thanks, but it still isn't working...
Just to clarify you did this didn't you? :
function genRandomString() {
$length = 10;
$characters = "0123456789abcdefghijklmnopqrstuvwxyz";
for ($p = 0; $p < $length; $p++) {
$string .= $characters[mt_rand(0, strlen($characters))];
}
return $string;
}
$string = genRandomString();
mysql_select_db("DATABASE", $con);
$sql = "INSERT INTO hits VALUES ('3', " . $string . ")";
mysql_query($sql);
and didn't include that guys typo?