What is $end error ? nt able to fix it

( ! ) Parse error: syntax error, unexpected $end in C:\wamp\www\advance php\login\submit.php on line 45

<?php
require_once 'connect.php';
var_dump($_POST);//use to see the all the possilbe value in the form of array with thier length..
if(isset($_POST['clientname']))
{
$clientname         	=$_POST['clientname']		;
$client_l_name      	=$_POST['client_lname']		;
$client_pass 			=$_POST['client_pass']		;
$client_con_pass		=$_POST['client_re_pass']	;
$client_client_phone	=$_POST['client_phone']		;
$client_mail			=$_POST['clientmail']		;
$client_date			=$_POST['user_date']		;
$client_month			=$_POST['month']			;
$client_year			=$_POST['year']			    ;
$client_gen				=$_POST['u_gen']			;
$client_sallary			=$_POST['sallary']			;
$client_pan				=$_POST['pancard']			;
}
//setcookie('username',$client,time()+120);
//echo $_COOKIE['username'];
//-------------------------------------------------------------
//!validations starts here---------------
// if($clientname=="")
// {
// 	$err.="username can't be empty";
// }
// if($client_l_name=="")
// {
// 	$err.="please fill last name";
// }
// if ($client_pass=="") 
// {
// 	$err.="please choose any password";
// }
// if ($client_con_pass=="")
// {
// 	$err.="please confrim password";
// 	elseif ($client_pass!=$client_con_pass) 
// 	{
// 		$pass_err="password is nt same";
// 	}
// }
?>
<!-- <html>
<head>
	<title>submit page</title>
</head>
<body>
<h1>Thank's Mr.<?php //echo $_COOKIE['username']; ?> For the intrest we will get back to u soon</h1>
</body>
</html> -->
<?php
require_once 'connect.php';
var_dump($_POST);//use to see the all the possilbe value in the form of array with thier length..
if(isset($_POST['clientname']))
{
$clientname         	=$_POST['clientname']		;
$client_l_name      	=$_POST['client_lname']		;
$client_pass 			=$_POST['client_pass']		;
$client_con_pass		=$_POST['client_re_pass']	;
$client_client_phone	=$_POST['client_phone']		;
$client_mail			=$_POST['clientmail']		;
$client_date			=$_POST['user_date']		;
$client_month			=$_POST['month']			;
$client_year			=$_POST['year']			    ;
$client_gen				=$_POST['u_gen']			;
$client_sallary			=$_POST['sallary']			;
$client_pan				=$_POST['pancard']			;
}
//setcookie('username',$client,time()+120);
//echo $_COOKIE['username'];
//-------------------------------------------------------------
//!validations starts here---------------
// if($clientname=="")
// {
// 	$err.="username can't be empty";
// }
// if($client_l_name=="")
// {
// 	$err.="please fill last name";
// }
// if ($client_pass=="") 
// {
// 	$err.="please choose any password";
// }
// if ($client_con_pass=="")
// {
// 	$err.="please confrim password";
// 	elseif ($client_pass!=$client_con_pass) 
// 	{
// 		$pass_err="password is nt same";
// 	}
// }
?>
<!-- <html>
[COLOR="#FF0000"]<head>[/COLOR] Erro
	<title>submit page</title>
</head>
<body>
<h1>Thank's Mr.<?php //echo $_COOKIE['username']; ?> For the intrest we will get back to u soon</h1>
</body>
</html> -->

If you are going to comment out pieces of code, be sure you don’t comment out the end php tag.

<?php
require_once 'connect.php';
var_dump($_POST);//use to see the all the possilbe value in the form of array with thier length..
if(isset($_POST['clientname']))
{
$clientname =$_POST['clientname'] ;
$client_l_name =$_POST['client_lname'] ;
$client_pass =$_POST['client_pass'] ;
$client_con_pass =$_POST['client_re_pass'] ;
$client_client_phone =$_POST['client_phone'] ;
$client_mail =$_POST['clientmail'] ;
$client_date =$_POST['user_date'] ;
$client_month =$_POST['month'] ;
$client_year =$_POST['year'] ;
$client_gen =$_POST['u_gen'] ;
$client_sallary =$_POST['sallary'] ;
$client_pan =$_POST['pancard'] ;
}
//setcookie('username',$client,time()+120);
//echo $_COOKIE['username'];
//-------------------------------------------------------------
//!validations starts here---------------
// if($clientname=="")
// {
// $err.="username can't be empty";
// }
// if($client_l_name=="")
// {
// $err.="please fill last name";
// }
// if ($client_pass=="")
// {
// $err.="please choose any password";
// }
// if ($client_con_pass=="")
// {
// $err.="please confrim password";
// elseif ($client_pass!=$client_con_pass)
// {
// $pass_err="password is nt same";
// }
// }
?>
<!-- <html>
<head>
<title>submit page</title>
</head>
<body>
<h1>Thank's Mr.
<?php
//echo $_COOKIE['username'];
?> For the intrest we will get back to u soon</h1>
</body>
</html> -->
<?php
require_once 'connect.php';
var_dump($_POST);//use to see the all the possilbe value in the form of array with thier length..
if(isset($_POST['clientname']))
{
$clientname =$_POST['clientname'] ;
$client_l_name =$_POST['client_lname'] ;
$client_pass =$_POST['client_pass'] ;
$client_con_pass =$_POST['client_re_pass'] ;
$client_client_phone =$_POST['client_phone'] ;
$client_mail =$_POST['clientmail'] ;
$client_date =$_POST['user_date'] ;
$client_month =$_POST['month'] ;
$client_year =$_POST['year'] ;
$client_gen =$_POST['u_gen'] ;
$client_sallary =$_POST['sallary'] ;
$client_pan =$_POST['pancard'] ;
}
//setcookie('username',$client,time()+120);
//echo $_COOKIE['username'];
//-------------------------------------------------------------
//!validations starts here---------------
// if($clientname=="")
// {
// $err.="username can't be empty";
// }
// if($client_l_name=="")
// {
// $err.="please fill last name";
// }
// if ($client_pass=="")
// {
// $err.="please choose any password";
// }
// if ($client_con_pass=="")
// {
// $err.="please confrim password";
// elseif ($client_pass!=$client_con_pass)
// {
// $pass_err="password is nt same";
// }
// }
?>
<!-- <html>
<head> Erro
<title>submit page</title>
</head>
<body>
<h1>Thank's Mr.
<?php
//echo $_COOKIE['username'];
?> For the intrest we will get back to u soon</h1>
</body>
</html> --> 

ok sir thanku :slight_smile:

Generally speaking, Unexpected $end means you’ve forgotten to close a statement block (anything in {}, or (), etc), causing the script to reach the end of file before finding the closing symbol.

Precisely. And PHP provides you the line number. Simple jump to that line (or count from the top of the file) and locate the offending code.

Wrong. The unexpected end parse error is thrown due to an unclosed control statement - if, for, foreach, switch, while, and so on. Failing to have a closing ?> will not cause a parse error. Indeed, it is recommended that you do NOT use a closing ?> mark to prevent unwanted whitespace following it from being echoed out by the browser and causing headaches with the header() statement (the “warning: headers already sent” problem).