Skip to main content

Posts

Showing posts from December 19, 2021

Cách 2: LỌC SẢN PHẨM: Chủng Loại --->Loại-->Sản Phẩm

Database : https://drive.google.com/file/d/16mUt4iNR-FOraT1NAjtpXkPJVh3tPaiY/view Hình ảnh : https://drive.google.com/file/d/19hJroj8BNEVV4_osAo2eXHspMciJb6LA/view <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <form method="get" id="form1" name="form1"> <p> <label for="loaisp">Chủng loại sp:</label> <select name="chungloai" id="chungloai" onChange="form1.submit();"> <?php $link=@mysqli_connect("localhost","root","") or die("Không tìm thấy Sever"); mysqli_select_db($link,"webtintuc") or die("Không tồn tại DB"); mysqli_query($link,"set names 'utf8'"); $sl="select * from webtm_chungloaisp"; $kq=mysqli_query($link,$sl); $idCL=0; while($d=mysqli_fetch_array($kq)) ...

LỌC SẢN PHẨM: Chủng Loại --->Loại-->Sản Phẩm (b1, b2, b3, b4, b5, b6) gồm 6 bước PHP&MySQL

Database : https://drive.google.com/file/d/16mUt4iNR-FOraT1NAjtpXkPJVh3tPaiY/view Hình ảnh : https://drive.google.com/file/d/19hJroj8BNEVV4_osAo2eXHspMciJb6LA/view Mục Tiêu: //connetc.php <?php //Kết nối đến server DB: $link=@mysqli_connect("localhost","root","") or die("Không thể kết nối đến Server!"); //Chọn database cần thao tác: mysqli_select_db($link,"webtintuc") or die("Không tồn tại DB này!"); mysqli_query($link,"set names 'utf8'");  ?>   //b1.php: <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <form id="form1" name="form1" method="get"> <p> <label for="chungloai">Chủng loai sp:</label> <select name="chungloai" id="chungloai"> <?php include("connect.php"); $sl=...