abhijadhav8308 / Library-Management-System

This Library Management System is developed using HTML, CSS, PHP and MySQL
38 stars 18 forks source link

verification code is not showing #1

Closed Jithendra18 closed 2 months ago

Jithendra18 commented 2 years ago

verification code is not loading. please help me

abhijadhav8308 commented 2 years ago

Make sure your "captcha.php" is in the same folder and contains the code as below :-

<?php session_start(); $text = rand(10000,99999); $_SESSION["vercode"] = $text; $height = 25; $width = 65; $image_p = imagecreate($width, $height); $black = imagecolorallocate($image_p, 0, 0, 0); $white = imagecolorallocate($image_p, 255, 255, 255); $font_size = 14; imagestring($image_p, $font_size, 5, 5, $text, $white); imagejpeg($image_p, null, 80); ?>

If this doesn't solve your issue and you want to bypass the verification code, then remove the below code.

if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='') { echo "<script>alert('Incorrect verification code');</script>" ; }

Don't forget to remove the subsequent else part and the closing curly bracket. Also the required attribute in this tag -> <input type="text" class="form-control1" name="vercode" maxlength="5" autocomplete="off" required style="height:25px;" />&nbsp;<img src="captcha.php">

Smr777 commented 1 year ago

can you please explain a little more where to edit the above code

khalliwete commented 1 year ago

do i still need to delete the captcha file?

sathish2503 commented 1 year ago

verification code is not loading. Now how to proceed further? The above steps are not useful

abhijadhav8308 commented 2 months ago

Hello Guys,

The captcha has been removed from the project.