Hello all
I am trying to create registration form. I am using wampserver 2.0. The code I am using is below. I am trying to fix that problem but I can't. Any help would be appreciated.
Error:
Parse error: parse error in C:\wamp\www\reg .php on line 20
connect.php code is:
I am trying to create registration form. I am using wampserver 2.0. The code I am using is below. I am trying to fix that problem but I can't. Any help would be appreciated.
Error:
Parse error: parse error in C:\wamp\www\reg .php on line 20
Code:
<?php
if(isset($_POST['reg'])){
$name = strlen($_POST['nickas']);
if($name <= 3){
print "Prisijungimo vardo ilgis turi buti ne mazesnis nei 3 simboliai!!!";
}else{
if($_POST['e-mail'] == ""){
print "Neivestas e-mailas!!!";
}else{
if($_POST['password'] == ""){
print "Neivedei slaptazodzio!!!";
}else{
if($_POST['password'] != $_POST['password2']){
print "Slaptazodziai mesutampa!!!";
}else{
require "connect.php";
$pass = md5($_POST['password']);
$data = date("Y-m-d H-i-s");
mysql_query("INSERT INTO `users` (nickas,e-mail,password,data)
//error is here
VALUES (`".$_POST['nickas']."`, '"$_POST['e-mail']."', '$pass'", '$data'")");
print "Uzsiregistravai sekmingai!!!"
}
}
}
}
}
?>
<form action="reg.php" method="post" />
Prisijungimo vardas:
<input type="text" name="nickas" /><br>
Slaptazodis:
<input type="password" name="password" /><br>
Slaptazodzio pakartojimas:
<input type="password" name="password2" /><br>
E-mailas:
<input type="text" name="e-mail" /><br>
<input type="submit" name="reg" value="Toliau">
</form>
Code:
<?php
$prisijungimas = mysql_connect("localhost", "root", "***") or die ("Klaida.")
mysql_select_db("duomenubaze");
?>
Comment