ID: 42296 Updated by: [EMAIL PROTECTED] Reported By: pretty dot killer at hotmail dot com -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: windows xp PHP Version: 5.2.4RC1 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2007-08-14 15:46:53] pretty dot killer at hotmail dot com Description: ------------ dont run Reproduce code: --------------- <?php if(ereg("^([a-zA-Z0-9_-])*$", $_POST['account']) && ereg("^([a-zA-Z0-9_-])*$", $_POST['password']) && ereg("^([a-zA-Z0-9_-])*$", $_POST['password2'])) { if ($page="index.php" && $_POST['account'] && strlen($_POST['account'])<16 && strlen($_POST['account'])>3 && $_POST['password'] && $_POST['password2'] && $_POST['password']==$_POST['password2']) { $check=mysql_query("select * from accounts where login='".$_POST['account']."'"); $check1=mysql_num_rows($check); if($check1>0) { echo "<p clss='error'><b>Failed to register : an account already excist .</b></p>"; } else { mysql_query("INSERT INTO accounts (login, password, access_level) VALUES ('".$_POST['account']."', '".base64_encode(pack('H*', sha1($_POST['password'])))."', 0)", $link); mysql_close($link); print '<p class="error"><b>Registration over successful </b></p>'; } } else { print '<p class="error"><b> </b></p>'.mysql_error(); } } else { echo "Restrictions have not been tested for safety. Please try to sign up with another username and password."; } ?> Expected result: ---------------- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in \insert.php on line 7 Registration over successful Actual result: -------------- a ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42296&edit=1