|
PHP bilan MySQL ma’lumotlar bazasini bog‘lash
|
bet | 15/20 | Sana | 08.12.2023 | Hajmi | 3,85 Mb. | | #113874 |
PHP bilan MySQL ma’lumotlar bazasini bog‘lash
2.3.1 Mijozlarni elektron ro‘yhatga olish dastur kodi rasmi va nusxasi (Visual Studio dasturida HTML5 va PHP )
2.8-rasm. Dastur kodi rasmi
DOCTYPE html> // Kochiboyev A
Sign UP
require('./connection.php');
if (isset($_POST['signUP_button'])) {
$name=$_POST['name'];
$lastName=$_POST['lastName'];
$email=$_POST['email'];
$password=$_POST['password'];
$confiPassword=$_POST['confiPassword'];
if(!empty($_POST['name'])&&!empty($_POST['lastName'])&&!empty($_POST['email'])&&!empty($_POST['password'])){
if($password==$confiPassword) {
$p=crud::conect()->prepare('INSERT INTO
crudtable(name,lastName,email,pass) VALUES(:n,:l,:e,:p)');
$p->bindValue(':n',$name);
$p->bindValue(':l',$lastName);
$p->bindValue(':e',$email);
$p->bindValue(':p',$password);
$p->execute();
echo 'Successfully!';
}else{
echo 'Password does not match!';
}
}
}
?>
2.9-rasm Dastur kodi nusxasi
2.3.2 Mijozlarni elektron ro‘yhatga olish dastur kodi rasmi va nusxasi (CSS da)
2.9-rasm. Dastur kodi rasmi
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
body{
background: rgb(83, 15, 148);
}
.form{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
background: rgb(250, 250, 250);
width: 300px;
height: 400px;
border-radius: 3px;
}
.form input{
border: 1px solid rgba(100, 100, 100, 0.3);
box-shadow: 1px 1px 2px rgba(180, 180, 180, 0.3),
-1px -1px 2px rgba(180, 180, 180, 0.3) ;
transform: translateY(50px);
display: block;
margin: 15px auto 0px auto;
height: 30px;
width: 80%;
text-align: center;
}
input:focus{
outline: none;
}
.form input[type="submit"]{
margin-top: 30px;
background: rgb(83, 15, 148);
width: 77%;
border-radius: 2px;
color: rgb(255 , 255, 255);
border: none;
font-size: 17px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
::placeholder{
position: relative;
left: 20px;
text-align: justify;
}
.title{
transform: translate(30px,40px);
}
.title p{
color: rgb(0, 0, 255);
font-weight: 600;
font-size: 1.2em;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
2.10-rasm Dastur kodi nusxasi
|
| |