PhpStorm print the script of php instead of html page
I'm developping a project of a generator of CV in HTML/PHP/CSS/SQL on a local server. When I use the chrome option to run a php file on PHPStorm, it prints the code between the two php tags and not the html page. It started today, before that all worked perfecty well.
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<title>Page d'inscription</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="grid-container">
<div class = "carre_acceuil">
<div class = "titre_acceuil">
Inscription
</div>
<form method="post" action="inscrire.php">
<div class = "formulaire_acceuil">
<label>
<input type = "text" name = "prenom" placeholder="Prenom" required class="input_acceuil"><br><br>
<input type = "text" name = "nom" placeholder ="Nom" required class="input_acceuil"><br><br>
<input type = "email" name = "email" placeholder ="Adresse email" required class="input_acceuil"><br><br>
<input type = "password" name = "password" placeholder ="Mot de passe" required class="input_acceuil"><br><br>
</label>
<input type="submit" value="S'inscrire" class="bouton">
</div>
</form>
</div>
</div>
</body>
And the file "inscrire.php" is here:
<?php
$nom = $_POST["nom"];
$nom = ucfirst(strtolower($nom));
$prenom = $_POST["prenom"];
$prenom = ucfirst(strtolower($prenom));
$email = $_POST["email"];
$password = crypt($_POST["password"]);
//se connecter a la base de donee
$bdd = new PDO("mysql:host=localhost;dbname=ifd1_gestion_cv;charset=utf8", "root", "");
// Cr?�er une requ??te INSERT INTO pour ins?�rer un ?�tudiant
$req = $bdd->prepare("INSERT INTO comptes (nom, prenom, email, password) VALUES (?,?,?,?);");
// Ex?�cuter la requ??te
$req->execute([ucfirst($nom), ucfirst($prenom), $email, $password]);
header("Location: index.php");
?>
Answer
Solution:
update, i desinstalled phpstorm and reinstalled it and now it works, thank you all!
Source