답변감사합니다.
고치긴 했는데
Fatal error: Call to unsupported or undefined function mysql_connect() in
/home/esperanz/public_html/testphp/input.php3 on line 12
이렇게 뜨네요
user : myuser
p.w : myuser
db : myuserdb
-- input.html --
<html>
<head>
<title>php 첫번째 테스트</title>
</head>
<body>
<center>
<form action="input.php3" method="post">
<h1>신규회원 가입신청서</h1>
<br><br>
<h3>개인정보를
입력하십시오</h3>
<table>
<tr>
<td> 아이디</td>
<td> <input type="text" name="id"
size="30"></td>
</tr>
<tr>
<td> 이 름</td>
<td> <input type="text" name="name"
size="30"></td>
</tr>
<tr>
<td> 전 화</td>
<td> <input type="text" name="tel"
size="30"></td>
</tr>
<tr>
<td colspan=2 align=center>
<input type="submit" value="신청"><input
type="reset" value="지우기">
</td>
</tr>
</table>
</center>
</body>
</html>
-- input.php3 --
<?
if(!$name){
echo("<script>
windows.alert('이름을
넣으세요')
history.go(-1)
</script>
");
exit;
}
$connection =
mysql_connect("localhost","myuser","myuser");
mysql_select_db("myuserdb",$connection);
$dbresult=mysql_query("insert into info values('$id', $name', '$tel')",
$connection);
if($dbresult=="")
{
echo("
<script>
window.alert('데이터
입력오류!!!')
history.go(-1)
</script>
");
exit;
}
?>
그리고 DB 테이블은 확실히 myuserdb 및에 info로 되어있습니다.
|