Last active
July 6, 2020 10:21
-
-
Save janosrusiczki/54601dee2edbdd2ea1f0d2837d18e4dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cnp = $_POST['cnp']; | |
$email = $_POST['email']; | |
$data_nasterii = $_POST['data_nasterii']; | |
$anul = $_POST['anul']; | |
$parola = $_POST['parola']; | |
$tipul = $_POST['tipul']; | |
$nume = $_POST['nume']; | |
$prenume = $_POST['prenume']; | |
$c = mysqli_connect('localhost', 'root', '', 'studenti'); | |
$sql = "INSERT INTO studenti (cnp, email, data_nasterii, anul, parola, tipul, nume, prenume) VALUES ($cnp, $email, $data_nasterii, $anul, $parola, $tipul, $nume, $prenume)"; | |
mysqli_query($c, $sql); | |
?> | |
<html> | |
<head> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> | |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" ></script> | |
<title>Studenti</title> | |
</head> | |
<body> | |
<form> | |
<div class="form-group"> | |
<input name="cnp" class="form-control" placeholder="CNP"> | |
</div> | |
<div class="form-group"> | |
<input type="email" name="email" class="form-control" placeholder="Email"> | |
</div> | |
<div class="form-group"> | |
<input type="text" name="data_nasterii" class="form-control" placeholder="Data nasterii"> | |
</div> | |
<div class="form-group"> | |
<select name="anul"> | |
<option value="1">1</option> | |
<option value="2">2</option> | |
<option value="3">3</option> | |
</select> | |
</div> | |
<div class="form-group"> | |
<input type="password" name="parola" class="form-control" placeholder="Parola"> | |
</div> | |
<div class="form-group"> | |
<input type="radio" name="tipul" value="licenta"> Licenta | |
<input type="radio" name="tipul" value="master"> Master | |
</div> | |
<div class="form-group"> | |
<input type="text" name="nume" class="form-control" placeholder="Nume"> | |
</div> | |
<div class="form-group"> | |
<input type="text" name="prenume" class="form-control" placeholder="Prenume"> | |
</div> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment