아래 , 기수별,학번별,지역벌을 검색하여, 3가지 다 일치하게 되면 db 에서 나오게 할려는데.
잘안되네요.ㅠㅠ
--------
--------
<form action="a_ok.php" method="post">
기수별 : <input type="text" name="mb_a2">
학번별 : <input type="text" name="mb_a1">
지역별 : <input type="text" name="mb_addr3">
<input type="submit" value="검색">
</form>
----------
<?
include_once("./_common.php");
$mb_a1=$_POST['mb_a1'];
$mb_a2=$_POST['mb_a2'];
//if (!$stx) alert("검색어가 없습니다.");
$g4[title] = "검색 : " . $stx;
include_once("./_head.php");
// DB 연결
error_reporting(E_ALL);
$mb_a1 = $_POST['mb_a1'];
$mb_a2 = $_POST['mb_a2'];
$mb_addr3 = $_POST['mb_addr3'];
$sql = "select * from g4_member where mb_a1='$mb_a1' AND mb_a2 = '$mb_a2' OR mb_addr3='{$mb_addr3}'";
$result = mysql_query($sql) or exit(mysql_error());
if ( !mysql_num_rows($result) ) exit('검색된 회원이 없습니다.
<a href="javascript:history.back();">
뒤로가기
</a>');
while ( $row = mysql_fetch_assoc($result) )
{
echo "
<table width=100% >
<td><center>회원아이디 : $row[mb_id] | 이름 : $row[mb_name] | 학번 : $row[mb_a1] | 기수 : $row[mb_a2] 졸업년도 : $row[mb_a4] | 관심동호회 : $row[mb_a6] | 생년월일 : $row[mb_birth] 이메일 : $row[mb_email] 전화번호 : $row[mb_tel] | 휴대폰 : $row[mb_hp]
</center>
</td>
</table>";
}
include_once("./_tail.php");
?>
잘안되네요.ㅠㅠ
--------
--------
<form action="a_ok.php" method="post">
기수별 : <input type="text" name="mb_a2">
학번별 : <input type="text" name="mb_a1">
지역별 : <input type="text" name="mb_addr3">
<input type="submit" value="검색">
</form>
----------
<?
include_once("./_common.php");
$mb_a1=$_POST['mb_a1'];
$mb_a2=$_POST['mb_a2'];
//if (!$stx) alert("검색어가 없습니다.");
$g4[title] = "검색 : " . $stx;
include_once("./_head.php");
// DB 연결
error_reporting(E_ALL);
$mb_a1 = $_POST['mb_a1'];
$mb_a2 = $_POST['mb_a2'];
$mb_addr3 = $_POST['mb_addr3'];
$sql = "select * from g4_member where mb_a1='$mb_a1' AND mb_a2 = '$mb_a2' OR mb_addr3='{$mb_addr3}'";
$result = mysql_query($sql) or exit(mysql_error());
if ( !mysql_num_rows($result) ) exit('검색된 회원이 없습니다.
<a href="javascript:history.back();">
뒤로가기
</a>');
while ( $row = mysql_fetch_assoc($result) )
{
echo "
<table width=100% >
<td><center>회원아이디 : $row[mb_id] | 이름 : $row[mb_name] | 학번 : $row[mb_a1] | 기수 : $row[mb_a2] 졸업년도 : $row[mb_a4] | 관심동호회 : $row[mb_a6] | 생년월일 : $row[mb_birth] 이메일 : $row[mb_email] 전화번호 : $row[mb_tel] | 휴대폰 : $row[mb_hp]
</center>
</td>
</table>";
}
include_once("./_tail.php");
?>
댓글 8개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기