I got problem in my php code that saying me : Parse error: syntax error, unexpected 'if' (T_IF), i tried to fixed a lot of time but none result. Any way my code is :
<?php
include 'header.php';
include 'config.php';
include 'footer.php';
?>
<?php
if(isset($_POST['rgstdo'])){
$u_name = strip_tags($_POST['u_name']);
$u_pwd = md5($_POST['u_pwd']);
$u_email = strip_tags($_POST['u_email']);
if(!empty($u_name) or !empty($u_pwd) or !empty($u_email)){
$u_name = strip_tags($_POST['u_name']);
$u_pwd = md5($_POST['u_pwd']);
$u_email = strip_tags($_POST['u_email']);
}
if(empty($u_name) or empty($u_pwd) or empty($u_email)){
echo "<div class='alert alert-danger' role='alert'>ERROR, All fields were filled</div>";
}else{
$dbadduser = mysql_query("INSERT INTO admins
('u_name','u_pwd','u_email')
VALUES
('$u_name','$u_pwd','$u_email')") or die (mysql_error());
if(isset($dbadduser)){
echo "<div class='alert alert-success' role='alert'>Done, now you can login</div>";
include './/index.php'
exit;()
}
}
}
?>
Error message : Parse error: syntax error, unexpected 'if' (T_IF) in C:\xampp\htdocs\kownload\path\admin-rgst.php on line 29