답변이 늦었군요....
지금 예비군 훈련 끝나고 나서....
제 생각으로는
PHP에서 mysql_connect()함수를 지원하지 않으므로
PHP3 컴파일시 --with-mysql 옵션을 넣지 않은것 같군요...
PHP3를 RPM으로 설치했다면 php3-mysql-xxxx.rpm
과 같은 패키지를 따로 설치해야 합니다...
<?
/**phpinfo.php3**************/
phpinfo();
?>
위와 같이 phpinfo.php3 로 확인시
"--with-mysql" 이라는 옵션이 있는지 확인해 보세요...
없다면 다시 컴파일하든지 RPM으로 설치하시길 바랍니다...
================================
[정익]님이 남기신 글:
>답변감사합니다.
>고치긴 했는데
>
>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로 되어있습니다.
======================================== |