| Server IP : 27.254.66.5 / Your IP : 216.73.217.39 Web Server : Apache/2 System : Linux cs82.hostneverdie.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64 User : technic2 ( 1951) PHP Version : 7.4.30 Disable Function : apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd,exec, fp, fput, highlight_file, ini_alter, ini_restore, inject_code, passthru,phpAds_remoteInfo, phpAds_XmlRpc,phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid,posix_setuid, posix_setuid, posix_uname,proc_open,proc_close, proc_get_status, proc_nice, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode, show_source,sleep,pcntl_exec,virtual,suexec,dbmopen,dl,symlink,disk_free_space,diskfreespace,leak MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/technic2/domains/technicrayong.ac.th/private_html/old-website/vecsc/ |
Upload File : |
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<?php
if (isset($_POST['college_id']) == false) {
$_POST['college_id'] = '';
}
?>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<select name="college_id" onChange="this.form.submit()">
<option value="-------">-------</option>
<option value="1321016101">วิทยาลัยเทคนิคระยอง</option>
<option value="1320026101">วิทยาลัยเทคนิคชลบุรี</option>
<option value="1310016201">วิทยาลัยอาชีวศึกษาเสาวภา</option>
<option value="1322016101">วิทยาลัยเทคนิคจันทบุรี</option>
</select>
</form>
<?php
if ($_POST['college_id'] <> '') {
// Create connection
$conn = mysqli_connect('localhost', 'root', '', 'vecsc');
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
mysqli_set_charset($conn,"utf8");
$sql = "SELECT DISTINCT college.college_id, college.college_name FROM ongkarn, college WHERE ongkarn.college_id = '" . $_POST['college_id'] . "'";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
//echo "มีการป้อนข้อมูลแล้ว" . "<br>";
echo "<script type='text/javascript'>alert('มีการป้อนข้อมูลแล้ว')</script>";
}
}
echo '<p><strong>You have selected</strong> <em>'. $_POST['college_id'].'</em></p>';
?>
</body>
</html>