Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[PHP][Tutorial] Basic Capcha

Vous Pas Reel
Loyal Member
Joined
Nov 6, 2007
Messages
880
Reaction score
11
Well here it goes
PHP:
<? session_start();  ?>
<?php
$rawr = rand(**** 10000);
$_SESSION['rawr'] = $rawr ;
$capcha = $rawr;
?>
<? echo("$rawr"); ?><form method="post" action="rawr.php">
capcha: <input type="text" size="10" maxlenght="5" name="rawr"> 
<input="sumbit">

PHP:
<? session_start(); ?>
<?php
$capcha = $_POST['rawr'];

if ( $capcha == $rawr ) {
    echo "Thank you, you may proceed";
} else {
    echo "you /fail";
}
session_destroy();
?>
Rand = Random, it will randomize the numbers through the varibles ( 100-1000)
 
Last edited:
Back
Top