Skip to main content

Posts

Showing posts from January 20, 2022

PHP#21MySQL#17 - Upload, Xử lý, Thư viện, chèn Ckeditor

//upload.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta  charset="utf-8" /> <title>Untitled Document</title> <script type="text/javascript" src="ckeditor/ckeditor.js"></script> </head> <body> <form action="process.php" method="post" enctype="multipart/form-data" name="form1" id="form1">   <p>     <label for="upImg">Chon anh:</label>     <input type="file" name="upImg" id="upImg" />   </p>   <p>     <label for="MoTa">Mo ta:</label>     <textarea name="MoTa" id="MoTa" cols="45" rows="5" class="ckeditor"></textarea>   </...

PHP#21MySQL#17 - tin_them.php, process.php - Thêm tin mới, Xử lý tin mới

 //tin_them.php <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript" src="ckeditor/ckeditor.js"></script> </head> <body> <?php include("../connect.php"); if(isset($_GET['lang'])) $lang=$_GET['lang']; else $lang='vi'; ?> <form id="form1" name="form1" method="get" action=""> <p> <label for="lang">Ngon ngu:</label> <select name="lang" id="lang" onchange="form1.submit();"> <option value="vi">Viet</option> <option value="en" <?php if($lang=='en') echo "selected='selected'";?>>Anh</option> </select> </p> <p> <l...