imported>talin0528 |
imported>linflus |
| Line 1: |
Line 1: |
| <?php
| | DeleteThisPage |
| $link = mysql_connect('mysql5.hosting.paran.com', 'linflus', 'dkdlffls');
| |
| if (!$link) {
| |
| die('Could not connect: ' . mysql_error());
| |
| }else{
| |
| echo("Connect Succesful.<br/>");
| |
| }
| |
|
| |
| $db = mysql_select_db("linflus_db");
| |
| /*
| |
| $sql = "CREATE TABLE guest
| |
| (no integer not null,
| |
| name char(10),
| |
| contents text(2000),
| |
| password char(4),
| |
| status integer,
| |
| date date)";
| |
|
| |
| $result = mysql_query($sql);
| |
|
| |
| if(!$result){
| |
| die('Can not create table');
| |
| }else{
| |
| echo($result);
| |
| }
| |
| */
| |
|
| |
| $sql = "INSERT INTO guest
| |
| values(1, 'ksh', 'hello', '1234', 1)";
| |
| $result = mysql_query($sql);
| |
|
| |
| $sql = "SELECT * FROM guest";
| |
| $result = mysql_query($sql);
| |
| $obj = mysql_fetch_object($result);
| |
|
| |
| echo($obj->name);
| |
| ?>
| |
|
| |
|