ȸ¿ø°¡ÀÔ - Áߺ¹Ã¼Å©
***index.html------------------------------------- <?session_start();?> <HTML> <HEAD> <TITLE> New Document </TITLE> <style> input {background:#ffdcd7} </style> </HEAD>
<BODY> <table border=1 width=800> <tr> <td colspan=2><img src=http://www.pcall.co.kr/img/103.gif height=150></td> </tr> <tr> <td width=30% height=300 valign=top>
¸Þ´º <br> <a href=index.html?mode=home>óÀ½À¸·Î</a> <? if($id){ echo <br>{$name}´Ô ȯ¿µÇÕ´Ï´Ù.<br>; echo <br><a href=logout.php>·Î±×¾Æ¿ô</a><br>; }else{ ?>
<form method=post action=login.php> <table border=1 width=200> <tr> <td>¾ÆÀ̵ð</td> <td><input type=text name=userid size=15 value=¾ÆÀ̵𸦠ÀÔ·Â onFocus=this.value=\></td> </tr> <tr> <td>ºñ¹Ð¹øÈ£</td> <td><input type=password name=userpass size=15 value=ºñ¹Ð¹øÈ£ÀÔ·Â onFocus=this.value=\ ></td> </tr> <tr> <td colspan=2 align=center> <input type=submit value=·Î±×ÀÎ></td> </tr> </table> </form>
<!-- *********************** <input type= ext name=
ame value=À̸§ style=order:black 1px solid;background-color:ivory onMouseOver= his.style.backgroundColor=ccffcc\ onMouseOut= his.style.backgroundColor=ivory\ onFocus= his.value=\ size=10> <input type= ext name=email value=À̸ÞÀÏ style=order:black 1px solid;background-color:ivory onMouseOver= his.style.backgroundColor=ccffcc\ onMouseOut= hes.style.backgroundColor=ivory\ onFocus= his.value=\ size=10> <input type= ext name=memo value=³»¿ë style=order:black 1px solid;background-color:ivory onMouseOver= his.style.backgroundColor=ccffcc\ onMouseOut= hes.style.backgroundColor=ivory\ onFocus= his.value=\ size=30> ********************** -->
<p> <a href=index.html?mode=join>ȸ¿ø°¡ÀÔ</a> <p>
<?}?> <a href=index.html?mode=board>°Ô½ÃÆÇ</a> <p> <a href=index.html?mode=memo>¸Þ¸ðÀå</a> <p> </td> <td align=center>
ºä <? if(!$mode){ $mode=home; } switch($mode){ case home: include
ull.html; break;
case oard: include oard1/list.html; break;
case memo: include ..memo/memolist.html; break; case join: include
egist.html; break;
case dview : include ./board1/view.html; break; } ?> </td> </tr> </table> </BODY> </HTML>
***regist.html------------------------- <!--¾ÆÀ̵ð ºñ¹Ð¹øÈ£ ºñ¹Ð¹øȣȮÀÎ À̸§ À̸ÞÀÏ ÁֹιøÈ£ ÀüȹøÈ£ ÁÖ¼Ò ÇÚµåÆù Á÷¾÷ Ãë¹Ì--> <script> function id_search(ref){ var id=eval(document.regist.userid); if(!id.value){ alert(¾ÆÀ̵𸦠ÀÔ·ÂÇϽŠÈÄ¿¡ È®ÀÎÇϼ¼¿ä!); id.focus(); return; }else{ ref=ref+?id=+id.value; var window_left=(screen.width-640)/2; var window_top=(screen.height-480)/2;
window.open(ref,id_search,width=250,height=140,status=no, top=+window_top+,left+window_left+\); //location.href=ref;
} } </script> <form name=regist method=post action=regist.php> <table border=1 width=500> <tr> <td width=20%>¾ÆÀ̵ð</td> <td><input type=text name=userid><input type=button onClick=id_search(id_search.php) value=Áߺ¹È®ÀÎ></td> </tr> <tr> <td>ºñ¹Ð¹øÈ£</td> <td><input type=password name=userpass1></td> </tr> <tr> <td>ºñ¹Ð¹øȣȮÀÎ</td> <td><input type=password name=userpass2></td> </tr> <tr> <td>ºñ¹Ð¹øÈ£ <br>ºÐ½Ç½ÃÁú¹®</td> <td><input type=text name=qusstion size=50></td> </tr> <tr> <td>Áú¹®´äº¯</td> <td><input type=text name=answer></td> </tr> <tr> <td>À̸§</td> <td><input type=text name=username></td> </tr> <tr> <td>À̸ÞÀÏ</td> <td><input type=text name=email></td> </tr> <tr> <td>ÁֹιøÈ£</td> <td><input type=text name=jumin1 size=6>-<input type=text name=jumin2 size=7></td> </tr> <tr> <td>ÀüȹøÈ£</td> <td><input type=text name=tell size=2>-<input type=text name=tel2 size=4>-<input type=text name=tel3 size=4></td> </tr> <tr> <td>¸ð¹ÙÀÏ</td> <td><input type=text name=mobile></td> </tr> <tr> <td>¿ìÆí¹øÈ£</td> <td><input type=text name=zip1 size=3>-<input type=text name=zip2 size=3></td> </tr> <tr> <td>ÁÖ¼Ò</td> <td><input type=text name=address size=20></td> </tr> <tr> <td>Á÷¾÷</td> <td><input type=text name=job></td> </tr> <tr> <td>Ãë¹Ì</td> <td><input type=text name=hobby></td> </tr> <tr> <td colspan align=center> <input type=submit value=°¡ÀÔ> </td> </tr>
</table> </form>
***regist.php-------------------------
<? //ÆÄÀϸí: memberdb.php /* ¾ÆÀ̵ð : userid ºñ¹Ð¹øÈ£: userpass ºñ¹Ð¹øȣȮÀÎ: ºñ¹Ð¹øÈ£Áú¹®:question Áú¹®´äº¯: ansewr À̸§: name À̸ÞÀÏ : jumin ÁֹιøÈ£: jumin ÀüȹøÈ£ : tel ÇÚµåÆù: ÁÖ¼Ò: address Á÷¾÷: job Ãë¹Ì: hobby
*/
echo userid --- $userid<br>; echo userpass --- $userpass1<br>; echo question --- $question<br>; echo answer --- $answer<br>; echo username --- $username<br>; echo email --- $email<br>; $jumin=$jumin1 . $jumin2; echo jumin --- $jumin<br>; $tel=$tell . - . $tel2 . - . $tel3; echo el --- $tel<br>; $zip=$zip1 . - . $zip2; echo zip --- $zip<br>; echo address --- $address<br>;
$totaladdress=$zip . / . $address;
echo otaladdress --- $totaladdress<br>; echo job --- $job<br>; echo hobby --- $hobby<br>;
include connect.php;
$query=insert into member values(NULL, $userid,$userpass1,$question,$answer,$username,$email,$jumin,$tel,$zip,$totaladdress,$job,$hobby);
$result=mysql_query($query) or die(mysql_error());
if($result){ echo ÀԷ¼º°ø; }else{ echo ÀԷ½ÇÆÐ; } /* $query=create table member( num int not null auto_increment primary key, userid varchar(20) not null unique, userpass varchar(20) not null , question varchar(150) not null, answer varchar(50) not null, username varchar(30) not null, email varchar(50) not null, jumin varchar(13) not null, tel varchar(20) not null, zip varchar(7) not null, address varchar(50) not null, job varchar(50) not null, hobby varchar(50) not null);
$result=mysql_query($query);
if($result){ echo Å×ÀÌºí »ý¼º ¼º°ø; }else{ echo Å×ÀÌºí »ý¼º ½ÇÆó; } */ ?>
***id_search.php ----------------------------
<script> function test(){ opener.document.regist.userpass1.focus(); self.close(); } </script>
<? include connect.php; $query=select * from member where userid=$id\; $result=mysql_query($query); $rows=mysql_num_rows($result);
if(!$rows){ echo $id´Â »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù!<br>; //echo <a href=javascript:self.close();>È®ÀÎ</a>; echo <input type=button onClick=test() value=È®ÀÎ>; }else{ echo $id´Â »ç¿ëÁßÀÔ´Ï´Ù!; }
/* Áߺ¹È®ÀÎ ¹æ¹ýóÀ½ if(!$rows){ echo <script> alert($id + ´Â »ç¿ëÇÏ½Ç ¼ö ÀÖ´Â ¾ÆÀ̵ð ÀÔ´Ï´Ù!); history.back(); </script>; }else{ echo <script> alert($id + ´Â »ç¿ë Áß ¾ÆÀ̵ð ÀÔ´Ï´Ù!); history.back(); </script>; } */ ?>
PHP½ºÅ͵ð 2004 12 22
¼Ò½ºÀÚ¼¼È÷ º¸±â
http://www.6VJ.com/php/php1222.txt
|