lundi 23 février 2015

My script has multiple errors [on hold]

Dreamweaver show's There's error at line 64 I.e. end of my php code and starting of HTML code. But in browser it shows there's error at line 100 I.e. end of document


Here's my php code:



<?php include("./inc/conc.inc.php"); ?>
<?php include(".inc/header.inc.php");?>
<?php
$reg = @$_post['reg'];
$fn = "";
$ln = "";
$un = "";
$em = "";
$pswd = "";
$pswd2 = "";
$u_check ="";

$fn = strip_tags(@$_POST['fname']);
$ln = strip_tags(@$_POST['lname']);
$un = strip_tags(@$_POST['username']);
$em = strip_tags(@$_POST['email']);
$pswd = strip_tags(@$_POST['password']);
$pswd2 = strip_tags(@$_POST['password2']);

if ($reg) {
if ($em==$em2) {

$u_check = mysql_query("SELECT username FORM users WHERE username_'$un'");

$u_check = mysql_num_rows($u_check);
if ($check == 0) {

if ($fn&&$ln&&$un&&$em&&$pswd&&$pswd2) {
if ($pswd==$pswd2) {

if (strlen($un)>25||strlen($fn)>25||strlen($ln)>25) {
echo"the maximum limit for username/first name/last name is 25 characters!";
}


else
{
if (strlen($pswd)>30||($pswd2)<5) {
echo "your password must be between 5 and 30 characters long!";
}
else
{
$pswd = md5($pswd);
$pswd2 = md5($pswd2);
$query = mysql_query("INSERT INTO users VALUES ('','$un','$fn','$ln','$em','$pswd','0')");
die("<h2>welcome Clasher!!!</h2>Log in to your ac...");
}
}
}
else{
echo"your passwords dont match!";
}
}
else{
echo"please fill in all of the fields";
}
}
else{
echo"username already taken...!";
}
}

?>

<table class="table">
<tr>
<td width="40%" >
<h2 style="color:white;">Join Us!! Clasher!!!</h2>
<div class="container form-marg form-group-lg-6">
<form>
<div class="row">
<div class="col-md-3">
<input class="form-control" type="text" name="fname" placeholder="First Name" required><br>
<input class="form-control" type="text" name="lname" placeholder="Last Name" required><br>
<input class="form-control" type="text" name="username" placeholder="Clash UserName" required><br>
<input class="form-control" type="text" name="Email" placeholder="Email" required><br>

<div id="divpass">
<input class="form-control" type="text" name="Password" placeholder="Password" id="password" required><br>
<input class="form-control" type="text" name="password2" placeholder="Password" id="password" required><br>
</div>
<label>
<input name="RadioGroup1" type="radio" required id="RadioGroup1_0" value="radio">
Male</label>
<br>
<label>
<input name="RadioGroup1" type="radio" required id="RadioGroup1_1" value="radio">
Female</label>
<br>
</p>
<button class="btn btn-default" type="submit" name="reg">Sign Up</button>
</div>
</form>
</div>
</td>
</tr>
</table>
</body>
</html>

Aucun commentaire:

Enregistrer un commentaire