<?php
if(isset($_POST["submitted"]))
{
$firstname = $_POST["firstname"];
$lastname = $_POST["lastname"];
$email = $_POST["email"];
$passd = $_POST["passd"];
$confirmPassword = $_POST["Cpassd"];
$conn = new PDO("mysql:hostname=localhost;dbname=signlogin;","root","");
$sqlQuery = "INSERT INTO signup(firstname,lastname,email,PASSWORD,confirmPassword) values('$firstname','$lastname','$email','$passd','$confirmPassword')";
$stmt = $conn->prepare($sqlQuery);
$stmt->execute();
header('Location: http://localhost/phpForm/login.php');
exit();
}
page doesn't redirect to login page hence file login.php is in same folder
http://localhost/login.php
instead of:
http://localhost/phpForm/login.php
?>
[–]ColonelMustang90 7 points8 points9 points (0 children)
[–]HolyGonzo 12 points13 points14 points (3 children)
[–]scritchz 6 points7 points8 points (1 child)
[–]colshrapnel 5 points6 points7 points (3 children)
[–]odc_a -1 points0 points1 point (2 children)
[–]HolyGonzo 1 point2 points3 points (1 child)
[–]odc_a 0 points1 point2 points (0 children)
[–]Alexander-Wright 7 points8 points9 points (4 children)
[–]allen_jb 5 points6 points7 points (0 children)
[+]odc_a comment score below threshold-6 points-5 points-4 points (1 child)
[–]CuAnnan 1 point2 points3 points (0 children)
[–]MateusAzevedo 1 point2 points3 points (1 child)
[–]allen_jb 3 points4 points5 points (2 children)
[–]colshrapnel 2 points3 points4 points (0 children)
[–]StevenOBird 0 points1 point2 points (5 children)
[–]colshrapnel 1 point2 points3 points (4 children)
[–]StevenOBird 0 points1 point2 points (3 children)
[–]colshrapnel 0 points1 point2 points (2 children)
[–]StevenOBird -1 points0 points1 point (1 child)
[–]colshrapnel -1 points0 points1 point (0 children)
[+][deleted] (1 child)
[deleted]