´äº¯°¨»çÇÕ´Ï´Ù.
°íÄ¡±ä Çߴµ¥
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·Î µÇ¾îÀÖ½À´Ï´Ù.
|