Here's the part of the code that is causing the problem:
$Pass = md5($Password);
$Validation_Code = md5($UserName microtime());
$filename = './JS/main.js';
$filename2 = './JS/jQuery.js';
if (file_exists($filename) && file_exists($filename2)) {
$sql = "insert into users (FirstName,LastName,UserName,Email,Password,Validation_Code,Active) values ('$FirstName','$LastName','$UserName','$Email','$Pass','$Validation_Code','0')";
$result = mysqli_query($con,$sql);
}
else {
header("location:https://www.onlineittuts.com");
}
Specifically this part is causing the problem:
$Validation_Code = md5($UserName microtime());
Can somebody tell me what is the issue and how I can solve it?
CodePudding user response:
Are you trying to concat strings? If yes then you should use a dot like this
$Validation_Code = md5($UserName . microtime());
The plus is a mathematical operator.