• 2.12-rasm
  • Mijozlarni elektron ro‘yhatdan o‘tgandan keyin Gazeta saytiga kirish uchun login formi qismi dastur kodi rasmi va nusxasi (HTML5 va PHP da)




    Download 3,85 Mb.
    bet16/20
    Sana08.12.2023
    Hajmi3,85 Mb.
    #113874
    1   ...   12   13   14   15   16   17   18   19   20
    2.3.3 Mijozlarni elektron ro‘yhatdan o‘tgandan keyin Gazeta saytiga kirish uchun login formi qismi dastur kodi rasmi va nusxasi (HTML5 va PHP da)



    2.11-rasm. Dastur kodi rasmi


    DOCTYPE html>






    Sign UP





    require('./connection.php');
    if (isset($_POST['login_button'])) {
    $_SESSION['validate']=false;
    $name=$_POST['name'];
    $password=$_POST['password'];
    $p=crud::conect()->prepare('SELECT * FROM crudtable WHERE name=:n and pass=:p');
    $p->bindValue(':n',$name);
    $p->bindValue(':p',$password);
    $p->execute();
    $d=$p->fetchAll(PDO::FETCH_ASSOC);
    if($p->rowCount()>0) {

    $_SESSION['name']=$name;


    $_SESSION['pass']=$password;
    $_SESSION['validate']=true;
    header('location:home.php');

    }else{

    echo 'Make sure that you are registere!';
    }

    }
    ?>










    Login form























    2.12-rasm Dastur kodi nusxasi
    2.3.4 Gazeta saytiga elektron ro‘yhattan o‘tgan mijozlarni elektron shakllantiruvchi dastur kodi rasmi va nusxasi (CSS da)



    2.13-rasm. Dastur kodi rasmi

    *{
    padding: 0;


    margin: 0;
    box-sizing: border-box;
    }
    body{
    background: white;
    }

    table{

    width: 90%;
    display: block;
    margin: auto;
    }

    table,tr,td,th{


    border: 1px solid rgb(200, 200, 200);


    border-collapse: collapse;
    }
    th{
    width: 500px;
    height: 30px;
    background: rebeccapurple;
    color: white;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    }

    td{

    text-align: center;
    }

    a{


    text-decoration: none;
    }

    img{

    width: 20px;
    height: 20px;
    }


    2.14-rasm Dastur kodi nusxasi


    2.3.5 Gazeta saytiga elektron ro‘yhattan o‘tgan mijozlarning elektron shakllangan ro‘yhatida. Ro‘yhatdan o‘tgan mijozlarni ma’lumotlarida kelib chiqqan xatochiliklar bo‘lsa to‘girlash, o‘zgartirish dastur kodi rasmi va nusxasi (HTML5 va PHP da)



    2.15-rasm. Dastur kod rasmi


    DOCTYPE html>






    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('UPDATE crudtable SET name=:n,lastName=:l,email=:e,pass=:p');
    $p->bindValue(':n',$name);
    $p->bindValue(':l',$lastName);
    $p->bindValue(':e',$email);
    $p->bindValue(':p',$password);
    $p->execute();
    echo 'Updated!';
    }else{
    echo 'Password does not match!';
    } } } ?>



    Sign UP form














    2.16-rasm. Dastur kodi nusxasi

    Download 3,85 Mb.
    1   ...   12   13   14   15   16   17   18   19   20




    Download 3,85 Mb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Mijozlarni elektron ro‘yhatdan o‘tgandan keyin Gazeta saytiga kirish uchun login formi qismi dastur kodi rasmi va nusxasi (HTML5 va PHP da)

    Download 3,85 Mb.