Welcome to the Browser-Base Game Zone forums!
I can send you pics of my cocks if you want reference.
<?php$db = mysql_connect("hosts_name", "user_name", "password") or die("Could not connect.");if(!$db) die("no db");if(!mysql_select_db("database_name",$db)) die(mysql_error());if(isset($_POST['roll'])){$dice=rand(1,6); //change the range if you want bigger dice, like d20echo "You rolled $dice with your Dice.<br />";mysql_query("insert into dice (dice) values ('$dice')") or die(mysql_error());} ?><br />Click Roll to roll a dice<br /><form method="post" action="dice.php"><input type="submit" value="Roll"> </form><?php$results=mysql_query("select * from dice order by id asc") or die(mysql_error());echo "Your previous rolls:<br />";while($result=mysql_fetch_array($results)){echo "$result[id]: Your rolled $result['dice'].<br />";?>
CREATE TABLE dice ( id int(11) NOT NULL auto_increment, dice int(11) NOT NULL, PRIMARY KEY (id))
On a 'Contact Us' form this is fine, especially if its a one off....in fact rolling a custom hand made captcha even one using named images like this is probably more successfull at blocking spambots that using a readymade widely distributed one.
<?php// Random number between 1 and 6$dice = rand(1,6);// Display the image.$image = imagecreatefromjpeg("images/dice".$dice.".jpg");header('Content-Type: image/jpeg');imagejpeg($image);?>