The following program lists the data for that ID after you enter it. Then you can modify it and write it later.
Data updates for Databases
if (Isset ($id))
{
if (!mysql_connect ("localhost", "username", "password"))
{echo "Cannot join database";
Exit ();
}
if (Isset ($url))
{
$query = "Update $jpg set id= ' $id ', url= ' $url ', mess= ' $mess ',
fromx= ' $fromx ', url1= ' $url 1 ', mess1= ' $mess 1 ', fromx1= ' $FROMX 1 ', url2= ' $url 2 ',
Mess2= ' $mess 2 ', fromx2= ' $fromx 2 ', url3= ' $url 3 ', mess3= ' $mess 3 ', fromx3= ' $fromx 3 '
where id= ' $id ';
$result =mysql_db_query ("elong", $query); Perform write
if (! $result)
{echo "error occurred!";
Exit ();
}
echo "$id has been updated!
";
echo "
N
N
Id |
$id |
N
N
URL address |
$url |
N
N
Small map |
$mess |
N
N
Description |
$fromx |
N
N
URL Address 1 |
$url 1 |
N
N
Small Figure 1 |
$mess 1 |
N
N
Description 1 |
$FROMX 1 |
N
N
URL Address 2 |
$url 2 |
N
N
Small Figure 2 |
$mess 2 |
N
N
Description 2 |
$FROMX 2 |
N
N
URL Address 3 |
$url 3 |
N
N
Small Figure 3 |
$mess 3 |
N
N
Description 3 |
$FROMX 3 |
N
n ";
echo "Back Home";
Exit ();
}
$query = "Select Id,url,mess,fromx,url1,mess1,fromx1,url2,mess2,fromx2,url3,mess3,fromx3 from $jpg
where id= ' $id ';
$result =mysql_db_query ("elong", $query);
if (! $result)
{echo "error occurred!";
Exit ();
}
$r =mysql_fetch_array ($result);
$id = $r ["id"];
$url = $r ["url"];
$mess = $r ["mess"];
$FROMX = $r ["FromX"];
$url 1 = $r ["URL1"];
$mess 1 = $r ["Mess1"];
$FROMX 1 = $r ["Fromx1"];
$url 2 = $r ["Url2"];
$mess 2 = $r ["Mess2"];
$FROMX 2 = $r ["FROMX2"];
$url 3 = $r ["Url3"];
$mess 3 = $r ["MESS3"];
$FROMX 3 = $r ["Fromx3"];
Echo
n ";
}
Else
{?>
Please lose the ID you want to change:
The above describes the Pimchanok Leuwisetpaibul PHP Desktop Center Three modifications to the database, including the Pimchanok Leuwisetpaibul aspects of the content, I hope that the PHP tutorial interested in a friend helpful.