웹3 [PHP] DB에서 데이터 불러오기 $conn=mysql_connect("호스트","아이디","비밀번호") or die("DB Connect Error!!");mysql_select_db("DB명",$conn) or die("DB Select Error!!");mysql_query("set name utf8");$query="select * from info";$selectsql=mysql_query($query,$conn);while($row=mysql_fetch_array($selectsql)){?> }mysql_close($conn);?> 2012. 6. 23. [PHP] DB에 데이터 저장 $connect=mysql_connect("호스트","아이디","패스워드")or die("DB Connect Error!!");mysql_select_db(shin,$connect) or die("DB Select Error!!");$name=$_GET[name];$sid=$_GET[sid];$spw=$_GET[spw];$sql="insert into info(name,sid,spw) values('$name','$sid','$spw')";$res=mysql_query($sql) or die(__FILE__." : LINE ".__LINE__."".mysql_error());mysql_close($connect);?> 2012. 6. 23. [PHP] 한글깨짐 해결 2012. 6. 23. 이전 1 다음