Project

General

Profile

« Previous | Next » 

Revision 253

Added by ryan almost 19 years ago

Added captcha verification to sign-up form

View differences:

signup_form.php
1 1
<?php
2 2

  
3
// $Id: signup_form.php,v 1.2 2005/04/08 07:36:57 rdjurovich Exp $
3
// $Id$
4 4

  
5 5
/*
6 6

  
......
58 58
		<input type="text" name="email" maxlength="255" />
59 59
	</td>
60 60
</tr>
61
<?php
62
// Captcha
63
if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) { /* Make's sure GD library is installed */
64
	if(CAPTCHA_VERIFICATION == true) {
65
		$_SESSION['captcha'] = '';
66
		for($i = 0; $i < 5; $i++) {
67
			$_SESSION['captcha'] .= rand(0,9);
68
		}
69
		?><tr><td class="field_title"><?php echo $TEXT['VERIFICATION']; ?>:</td><td>
70
		<table cellpadding="2" cellspacing="0" border="0">
71
		<tr><td><img src="<?php echo WB_URL; ?>/include/captcha.php" alt="Captcha" /></td>
72
		<td><input type="text" name="captcha" maxlength="5" /></td>
73
		</tr></table>
74
		</td></tr>
75
		<?php
76
	}
77
}
78
?>
61 79
<tr>
62 80
	<td>&nbsp;</td>
63 81
	<td>

Also available in: Unified diff