In Visual Studio Code, i am working on creating a website. An HTML page i have has a form that gets the user data...
<form action="Data.php" style="position: fixed; top: 60px; left: 5px;" method="POST">
<fieldset>
<legend>Create Account</legend>
Username: <br>
<input type="text" name="username">
<br>
Email:<br>
<input type="text" name="email">
<br>
Password:<br>
<input type="text" name="password">
<br><br>
<input type="submit" name ="Submit" value="Create">
</fieldset>
</form>
it then sends it to a php file called Data.php...
<?php
if(isset($_POST['Submit'])){
$host = "localhost:3306";
$username = "Arthos";
$password = "Pancake101!";
$database = "userinfo";
$user = $_POST['username'];
$email = $_POST['email'];
$pass = $_POST['password'];
$connect = mysqli_connect($host, $username, $password, $database);
$query = "INSERT INTO 'users'('username', 'email', 'password') VALUES ("'.$user.'", "'.$email.'", "'.$pass.'")";
$result = mysqli_query($connect,$query);
mysqli_close($connect);
}
?>
and i do not have a clue how to view php echos or mysql errors in vs code considering i am using a base html project and they are not appearing in the debug console. I can send what the data base looks like if it is needed.