Error : Deprecated: Function session_register() is deprecated

I know why I'm getting it  - I know what the error is. error on line 18

What do I need to change

Second one I had today

$errore = 0;
if(isset($_POST['submit']) && isset($_SESSION['captcha'])) {
		$_code = $_POST['code'];
		if($_SESSION['captcha'] == $_code){
			header("Location: go.html");
		} else {
			$errore = 1;
	} else {
		$errore = 1;
$stringa = '';
$cifre = 5;
	$letteraOnumero = rand(1,2);
	if($letteraOnumero == 1){
		// lettera
		$lettere = 'ABEFHKMNRVWX';
		$x = rand(1,11);
		$lettera = substr($lettere,$x,1);
		$stringa .= $lettera;
	} else {
		$numero = rand(3,7);
		$stringa .= $numero;
$_SESSION['captcha'] = $stringa;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Verify You Are Human!</title>
<link href="../PNL-CSS-2-Column.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="" type="image/x-icon">
<style type="text/css">
#captcha{margin:0 auto;text-align:center}
body,td,th {
	color: f0f0f0;
body {
	background-color: #993300;
.style5 {font-family: Verdana, Arial, Helvetica, sans-serif}

<div id="captcha">
	<p><img src="captcha.php" /></p>
  <p class="style5"><span class="style5"><strong>To proceed to the web form please<br />
    insert the code you see above into the Code field below<br />
    and then click the enter button.
  </strong> <br />
    [ any letters you see should be inserted as CAPITALS and if you<br /> 
    have difficulty in reading the image above then refresh your browser <br />
    a few times until you see an image that is clear enough to copy
  ]  </span></p>
  <p class="style5">If you get the code wrong, you will be allerted and can try again </p>
<form id="captchaform" action="<?php echo $PHP_SELF ?>" method="post">
		<p><label for="code"><span class="style4">Code</span>: </label>
	<input type="text" name="code" id="code" /></p>
		<p><input type="submit" id="submit" name="submit" value="Enter" /></p>
	<?php if($errore == 1){ ?>
  <p class="errore style5"><span class="style4">The code you inserted was not correct .</span><br />
	<a href="<?php echo $PHP_SELF ?>" class="style5">Click here to generate a new Captcha code and try again</a></p>
  <?php } ?>

Open in new window

LVL 58
Pete LongTechnical ConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Om PrakashCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pete LongTechnical ConsultantAuthor Commented:
Spot on - Points well deserved
Avinash ZalaWeb ExpertCommented:
use this:




Hope this helps,
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.