繼承人我的代碼如何將功能相結合,讓某些studid的信息
if(isset($_POST['select'])){
$studId = $_REQUEST['studid'];
foreach ($studId as $ch){
echo $ch."<br>";
}
}
//the result of this is like this
c-1111
c-1112
c-1113
// but i want to know their names
我有一個函數來得到下圖所示的studinfo。在上面的代碼如何將我申請/插入此得到那些stuid's..pls的名字幫助
function getuserinfo($ch){
$info_select = "SELECT `$ch` FROM `tbl_student` WHERE `studId`='$ch'";
if ($query_get = mysql_query($info_select)) {
if ($result = mysql_result($query_get, 0, $ch)) {
return $result;
}
}
}
$fname = getuserinfo('fname');
$lname = getuserinfo('lname');
$mname = getuserinfo('mname');
代碼有什麼幫助? –
@WilliamN ...知道這些studid的名字 –