Hello,
i have a problem while trying to connect to MySQl using a script below - it simply does nothing. No error, no new data in a db table.. nothing. I simply do not know what else to check: SQL freshly installed, no passwords, windows firewall turned off.
my index.html contains this tiny code for a testing form that was supposed to be entered into a mySQL database "tutorial" within a table "AccountCreationDB"
INDEX.HTML
<html>
<body>
<form action="includes.php" method="post">
<BR>username:
<input name="regUsername" type="text">
<BR><BR>>email address:
<input name="regEmail" type="text">
</form>
<input type="submit" name="submit">
</body>
</html>
-----------------------------
INCLUDES.PHP
<?php
$dbServername = "127.0.0.1";
$dbUsername = "root";
$dbPassword = "";
$dbName = "tutorial";
$con = mysqli_connect($dbServername, $dbUsername, $dbPassword, $dbName);
$regUsername = $_POST['regUsername'];
$regEmail = $_POST['regEmail'];
$sql = "INSERT INTO accountcreationdb (regUsername, regEmail) VALUES ('$regUsername','$regEmail');";
mysqli_query($con,$sql);
header("Location: step2.html");
?>
any help appreciated.. to me it does not look like the issue with the code but a communication failure between "browser and SQL".