$id =isset ($_get[' id ')? $_get[' id ']: ';
if (!is_numeric ($id)) {
Exit ("Sorry, the user you visited <script>alert!"); History.back ();</script> ");
}else{
$sql = "SELECT * from Wk_member where id= ' $id '";
MySQL tutorial _query ("Update wk_member set m_hit=m_hit+1 where id= ' $id '");
mysql_query ("Update wk_works set w_browse=w_browse+1 where m_id= ' $id '");
$result =mysql_query ($sql) or Die (Mysql_error ());
if (mysql_num_rows ($result)) {
$rs =mysql_fetch_array ($result);
$no = $rs [' M_uid '];
$hit = $rs [' M_hit '];
Mysql_free_result ($result);
$sql = "SELECT * from Wk_works where m_id= ' $id '";
$result =mysql_query ($sql) or Die (Mysql_error (). $sql);
$w _dec = ' not written declaration ';
$w _head = ' images/head.gif ';
$w _support = 0;
$w _blog = ' The author has not yet uploaded the works ';
if (mysql_num_rows ($result)) {
$rs =mysql_fetch_array ($result);
$w _support = $rs [' W_support '];
$w _browse = $rs [' W_browse '];
$w _dec = $rs [' W_dec '];
$w _head = $rs [' w_lt '];
$w _blog = $rs [' W_blog '];
}
}else{
Exit ("Sorry, the user you visited <script>alert!"); History.back ();</script> ");
}
}
Database Tutorial Connection Program
mysql_connect (' localhost ', ' root ', ' 1****** ') or Die (' database server no exists! ');
mysql_select_db (' wk ') or Die (' Database error! ');
mysql_query ("SET NAMES ' GBK");//set document CharSet encode
Webmaster designated, this is nothing good to specify, is the basic MySQL query, and then get the results assigned to the corresponding variable.