묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
소스 분석좀..
2005.08.10 21:55
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<script language="javascript">
<!--
function textarea_size(obj) {
obj.rows += 3;
//resizeTo(,400)
}
-->
</script>
<style><!--
A:link { color: #ababab; text-decoration:none; }
A:visited { color: #ababab; text-decoration:none; }
A:active { color: #ababab; text-decoration:none; }
A:hover { color: #ababab; text-decoration:underline; } -->
</style>
<script language='JavaScript'>
function newOpen(url) {
window.open(url,'cnjOpen','resizable=1,scrollbars=1,status=0,width=820,height=200');
}
</script>
<title>QnA 지식KIN </title>
<table border="0" cellpadding="0" cellspacing="0" width="800">
<tr>
<td colspan="3" width="800" height="32">
</font></span><span style="font-size:9pt;"><font color="#ABABAB"><br> - 이 페이지는 누구나 질문하고 답변 할 수 있도록 만들어진 오픈 데이터베이스 프로젝트입니다.</span></font>
</td>
</tr>
<form name=db_project action=index.php method="post">
<tr>
<td width="80" valign="top">
<p> </p>
</td>
<td width="620"> </td>
<td width="80"> </td>
</tr>
<tr>
<td width="80" valign="top" height="77">
<p align="center" style="margin-top:5; cursor:hand;" onclick="textarea_size(document.form.ask)"><span style="font-size:9pt;"><font color="#ABABAB">질문 내용 :<br><span style="font-size:8pt;">(늘이기)</span></font></span></p>
</td>
<td width="620" valign="top" height="77">
<textarea name=ask rows="4" cols="89" style="color:rgb(72,118,118); border-width:1; border-color:rgb(38,118,145); border-style:solid;"></textarea></td>
<td width="80" valign="top" height="77">
<p align="center" style="margin-top:5;"> <input type="submit" name="button" value="등록"></form>
</p>
</td>
</tr>
<tr>
<td width="80" height="33">
<p align="center"><span style="font-size:9pt;"><font color="#ABABAB">총 db수 </font></span>
<td width="620" height="33"><span style="font-size:9pt;"><font color="#ABABAB"> </font></span></td>
<td width="80" height="33"> </td>
</tr>
<?php // 수정 시작
$host_name = "localhost";
$user_name = "아이디";
$user_password = "비번";
$db_name = "db"; //수정끝
$connect = mysql_connect("$host_name","$user_name","$user_password");
mysql_select_db("$db_name");
$que = "INSERT INTO qna VALUES (
'$ask',
'',
''
)";
mysql_query($que , $connect);
$data = "SELECT * FROM qna";
mysql_query( $quee , $connect);
for($i = 0; $i < $total; $i++)
{
mysql_data_seek($data,$i);
$human = mysql_fetch_array( $data );
?>
<?
echo "나 $human[num]";
}
?>
이소스 분석좀..해주세요
<script language="javascript">
<!--
function textarea_size(obj) {
obj.rows += 3;
//resizeTo(,400)
}
-->
</script>
<style><!--
A:link { color: #ababab; text-decoration:none; }
A:visited { color: #ababab; text-decoration:none; }
A:active { color: #ababab; text-decoration:none; }
A:hover { color: #ababab; text-decoration:underline; } -->
</style>
<script language='JavaScript'>
function newOpen(url) {
window.open(url,'cnjOpen','resizable=1,scrollbars=1,status=0,width=820,height=200');
}
</script>
<title>QnA 지식KIN </title>
<table border="0" cellpadding="0" cellspacing="0" width="800">
<tr>
<td colspan="3" width="800" height="32">
</font></span><span style="font-size:9pt;"><font color="#ABABAB"><br> - 이 페이지는 누구나 질문하고 답변 할 수 있도록 만들어진 오픈 데이터베이스 프로젝트입니다.</span></font>
</td>
</tr>
<form name=db_project action=index.php method="post">
<tr>
<td width="80" valign="top">
<p> </p>
</td>
<td width="620"> </td>
<td width="80"> </td>
</tr>
<tr>
<td width="80" valign="top" height="77">
<p align="center" style="margin-top:5; cursor:hand;" onclick="textarea_size(document.form.ask)"><span style="font-size:9pt;"><font color="#ABABAB">질문 내용 :<br><span style="font-size:8pt;">(늘이기)</span></font></span></p>
</td>
<td width="620" valign="top" height="77">
<textarea name=ask rows="4" cols="89" style="color:rgb(72,118,118); border-width:1; border-color:rgb(38,118,145); border-style:solid;"></textarea></td>
<td width="80" valign="top" height="77">
<p align="center" style="margin-top:5;"> <input type="submit" name="button" value="등록"></form>
</p>
</td>
</tr>
<tr>
<td width="80" height="33">
<p align="center"><span style="font-size:9pt;"><font color="#ABABAB">총 db수 </font></span>
<td width="620" height="33"><span style="font-size:9pt;"><font color="#ABABAB"> </font></span></td>
<td width="80" height="33"> </td>
</tr>
<?php // 수정 시작
$host_name = "localhost";
$user_name = "아이디";
$user_password = "비번";
$db_name = "db"; //수정끝
$connect = mysql_connect("$host_name","$user_name","$user_password");
mysql_select_db("$db_name");
$que = "INSERT INTO qna VALUES (
'$ask',
'',
''
)";
mysql_query($que , $connect);
$data = "SELECT * FROM qna";
mysql_query( $quee , $connect);
for($i = 0; $i < $total; $i++)
{
mysql_data_seek($data,$i);
$human = mysql_fetch_array( $data );
?>
<?
echo "나 $human[num]";
}
?>
이소스 분석좀..해주세요