<?php session_start(); include("db_connect.php"); if(!$_SESSION['USERNAME']){ //ตรวจสอบการล็อกอิน ?> <script type="text/javascript"> window.location="index.php"; </script> <?php } <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title></title> </head> <body> $sql = "update tire_book SET pagecall = '1' WHERE id = '3794' "; $conn->query($sql) or die("<br>SQL Error: ".$sql."<br>".$conn->error); </body>
if(!$_SESSION['USERNAME']){ //ตรวจสอบการล็อกอิน ?> <script type="text/javascript"> window.location="index.php"; </script> <?php }
die(header("Location: add-job.php")); // หรือ exit(header("Location: add-job.php")); // หรือ exit('<script type="text/javascript"> window.location="index.php"; </script>'); // หรือ echo '<script type="text/javascript"> window.location="index.php"; </script>'; exit;
<?php $someCondition = true;// สมมุติว่าสั่งทำงานอะไรสักอย่างแล้วเก็บเงื่อนไขใส่ตัวแปรนี้ if (true === $somCondition) { // ถ้าเงื่อนไขบางอย่างในตัวแปรนั้นเป็นจริง // สั่ง redirect ด้วยการส่ง header ออกไป header('Location: newpage.php'); } // ทดลองเขียนอะไรสักอย่างลงไฟล์ txt. file_put_contents(__DIR__ . '/test.txt', 'hello', FILE_APPEND); // ส่ง body ออกไป echo 'hello world';
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง