PHP page assignment related issues. Greatly help to solve the problem. Give the sub-code

Source: Internet
Author: User
PHP page Assignment problem .... Greatly help to solve the problem. Online waiting for the sub-attached code













(Search business card related categories such as: Domestic, real estate, etc.)

$conn =mysql_connect ("localhost", "root", "toma123") or Die ("Connection error");
mysql_select_db ("CS", $conn);
mysql_query ("Set names ' GBK '");
mysql_query ("Set Characher set gb2312");
mysql_query ("Set names gb2312");
$key = $_get[' key '];

?>











$conn =mysql_connect ("localhost", "root", "toma123") or Die ("Connection error");
mysql_select_db ("CS", $conn);
mysql_query ("Set names ' GBK '");
mysql_query ("Set Characher set gb2312");
mysql_query ("Set names gb2312");

$MD =$_get[' key '];



if ($MD! = "") {

$sql = "SELECT * from Ud8 where title like '% $MD% '";

$result =mysql_query ($sql);

$sst =mysql_fetch_array ($result);

$num =mysql_num_rows ($result); Number of rows of statistics

$pages =ceil ($num/8); Total pages

$page =$_get[' page '; Get page, if not set or page=0, put $page=1;

if ($page = = "")
{
$page = 1;
}

$start = ($page-1) *8;

$sql = "SELECT * from Ud8 the where title like '% $MD% ' limit '. $start.", ". 8;

$query =mysql_query ($sql);

while ($sumpage =mysql_fetch_array ($query)) {

$id = $sumpage [' id '];

$DD = $id;



?>












  • Company Name Business Introduction Thumbnail image View Business Cards
    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.