Php submits parameter query solutions through forms

Source: Internet
Author: User
Php submits a parameter query through a form. for example, if you want to make a simple query system: now there is no form, the code is as follows: PHPcode & lt ;? Php $ con = mysql_connect (& quot; localhost & quot;, & quot; username & quot;, & quot; password & quot;); php submits parameter queries through the form
If you want to make a simple query system:
The code is as follows:
PHP code
  dateipnumber";while($row = mysql_fetch_array($result))  {  echo "";  echo "" . $row['FirstName'] . "";  echo "" . $row['LastName'] . "";  echo "";  }echo "";mysql_close($con);?>

Now I want to change the 05-08 and the last limit 10 numbers 10 in this code SQL statement to form submission.
0508 is better to enter a range, such as 0508 to 0510.

How can this problem be achieved?

If I use a form, I need to create another html file?

------ Solution --------------------
$ Limit = 'limit'. $ _ POST ['start']. ','. $ _ POST ['end'];

$ SQL = "SELECT date, ip, count (ip) as count FROM syn_number WHERE date like '% 05-08%' group by ip order by count desc $ limit ";

$ Result = mysql_query ($ SQL );



------ Solution --------------------
SELECT date, ip, count (ip) as count FROM syn_number
You get only three columns of data from the data: date, ip, and count: FirstName, SecondName, and LastName?

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: 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.