Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8449927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:50:05+00:00 2026-06-10T10:50:05+00:00

Okay, so I am trying to make my own captcha system. I have two

  • 0

Okay, so I am trying to make my own captcha system. I have two pages, the form page, and the form action. Here is my codes:

<html>
<head>
<title>Captcha</title>
<center>
<form method="POST" action="captcha.php">
<label>Entered Text:  </label><input type="text" name="captcha">
<input type="submit" name="submit" value="Submit Captcha!">
</form>
</center>
</head>
</html>
<?php
$firstdigit = rand(1, 9);
$seconddigit = rand(27, 105);
$lastdigit = rand(1050, 9515);
$middle = rand(1000, 20000);
$captcha = "<b><center><font face=\"Arial\">AX-$firstdigit-X-$seconddigit-K3I$middle-AN3Z-$lastdigit</font></center></b>";
echo "$captcha";
?>

and then the next:

<?php
$captcha2 = $_POST['captcha']; //This is the input field
$submit = $_POST['submit'];  //This is Submit
if ($submit) {
  if ($captcha2) {
    echo "Everything is good."; //Echo'd if everything is good
   } else {
  echo "Please fill in all fields."; //Echo'd if $captcha isn't filled out
   }
 } else {
echo "Direct access not allowed.  Please click submit.";   //Echo'd if  submit is not pressed, and they access this directly.
}
?>

How can I take the $captcha variable from the other form and put it onto the captcha.php page? I figured that $captcha has lots of variables put into one, so how

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:50:07+00:00Added an answer on June 10, 2026 at 10:50 am

    Use a session: http://php.net/manual/en/features.sessions.php

    Generate a random string when the session is created and store it in $_SESSION. Use that value to draw the CAPTCHA and to check it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay here is what I'm trying to do: I have a model object that
Hello I have been trying to make this form work with no luck, So
Okay so I'm trying to make a secure download system where a certain buyer
Okay, so I'm trying to make this action change a user-editable textfield if the
Okay so I'm trying to make a little gag program that will run away
Okay, so I'm trying to make this bigger: Post: <input id=postbox type=text rows=6 cols=40
Okay I been trying to work this out but unable too. I have a
okay i have been trying to understand this for hours i am learning VB
I'm new here. I have been trying to create a video capture app using
Okay i'm trying to make ChucK available in exported Processing sketches, i.e. if i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.