ในหน้าเพิ่มข้อมูล
คือในตารางregister จะต้องกรอกข้อมูล เช่น รหัส ชื่อ บริษัท แต่ในช่องของบริษัทต้องการจะใช้ list/menu เพื่อให้เลือกชื่อบริษัทได้เลย แต่ในฐานข้อมูลตาราง register ตรงชื่อบริษัทใส่เป็นรหัสของบริษัทเอาไว้ แล้วเชื่อมไปที่ตาราง company_Id อีกทีนึง อยากทราบว่าจะสามารถทำให้หน้าเพิ่มข้อมูลนั้นมองเห็นใน list/menu เป็นชื่อบริษัทแล้วพอนำเข้าไปเก็บในฐานข้อมูลเปลี่ยนเป็นรหัสแทนได้ไหมอ่ะคะ ถ้าได้ต้องทำยังไงบ้างอ่ะ แล้วต้องใส่ code ไว้ตรงไหนอ่ะคะ ขอบคุณมากค่ะ
(เขียนใน dreamweaver อ่ะค่ะ)
ปล.ไม่รู้อธิบายเข้าใจรึป่าว
ภาษาไทย สำหรับ phpBB เวอร์ชั่นล่าุด คือ 3.2.2
มาแล้วโหลดได้เลย
มาแล้วโหลดได้เลย
ถามหน่อยนะคะ เกี่ยวกับ list/menu
Moderator: phpbb, mindphp, ผู้ดูแลกระดาน
ดู ตาม กระทู้ นี้ครับ
http://www.mindphp.com/modules.php?name ... =1958#4615
คล้ายๆ กัน แล้วเปลี่ยน ข้อมูลที่จะเอามาแสดง ให้ดึงมาจาก ฐานข้อมูล แทน ครับ
http://www.mindphp.com/modules.php?name ... =1958#4615
คล้ายๆ กัน แล้วเปลี่ยน ข้อมูลที่จะเอามาแสดง ให้ดึงมาจาก ฐานข้อมูล แทน ครับ
สร้างไฟล์ pdf online
ท่องเที่ยว http://www.thailandhotelforums.com/" onclick="window.open(this.href);return false;
สอน php http://www.mindphp.com/" onclick="window.open(this.href);return false;
ท่องเที่ยว http://www.thailandhotelforums.com/" onclick="window.open(this.href);return false;
สอน php http://www.mindphp.com/" onclick="window.open(this.href);return false;
ตัวอย่าง การเขียน php ติดต่อกับ ฐานข้อมูล mysql
<?php
$conn = mysql_connect("localhost", "mysql_user", "mysql_password");
if (!$conn) {
echo "Unable to connect to DB: " . mysql_error();
exit;
}
if (!mysql_select_db("mydbname")) {
echo "Unable to select mydbname: " . mysql_error();
exit;
}
$sql = "SELECT id as userid, fullname, userstatus
FROM sometable
WHERE userstatus = 1";
$result = mysql_query($sql);
if (!$result) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}
if (mysql_num_rows($result) == 0) {
echo "No rows found, nothing to print so am exiting";
exit;
}
// While a row of data exists, put that row in $row as an associative array
// Note: If you're expecting just one row, no need to use a loop
// Note: If you put extract($row); inside the following loop, you'll
// then create $userid, $fullname, and $userstatus
while ($row = mysql_fetch_assoc($result)) {
echo $row["userid"];
echo $row["fullname"];
echo $row["userstatus"];
}
mysql_free_result($result);
?>
<?php
$conn = mysql_connect("localhost", "mysql_user", "mysql_password");
if (!$conn) {
echo "Unable to connect to DB: " . mysql_error();
exit;
}
if (!mysql_select_db("mydbname")) {
echo "Unable to select mydbname: " . mysql_error();
exit;
}
$sql = "SELECT id as userid, fullname, userstatus
FROM sometable
WHERE userstatus = 1";
$result = mysql_query($sql);
if (!$result) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}
if (mysql_num_rows($result) == 0) {
echo "No rows found, nothing to print so am exiting";
exit;
}
// While a row of data exists, put that row in $row as an associative array
// Note: If you're expecting just one row, no need to use a loop
// Note: If you put extract($row); inside the following loop, you'll
// then create $userid, $fullname, and $userstatus
while ($row = mysql_fetch_assoc($result)) {
echo $row["userid"];
echo $row["fullname"];
echo $row["userstatus"];
}
mysql_free_result($result);
?>
สร้างไฟล์ pdf online
ท่องเที่ยว http://www.thailandhotelforums.com/" onclick="window.open(this.href);return false;
สอน php http://www.mindphp.com/" onclick="window.open(this.href);return false;
ท่องเที่ยว http://www.thailandhotelforums.com/" onclick="window.open(this.href);return false;
สอน php http://www.mindphp.com/" onclick="window.open(this.href);return false;
ผู้ใช้งานขณะนี้
กำลังดูบอร์ดนี้: 214 และ บุคคลทั่วไป 0 ท่าน