Home > Backend Development > PHP Tutorial > PHP practical day 12_PHP tutorial

PHP practical day 12_PHP tutorial

WBOY
Release: 2016-07-14 10:11:12
Original
1044 people have browsed it


It took about 10 hours, and the guidance provided by teacher Niu B made the page more colorful.

Then during the competition, the time was two hours, and the school’s computer room was a bit tricky. It was ie6 and DW was the 2004 version.

The php part of this source code is just a message board

I encountered a coding error at that time. The reason was that mysql_query("set names utf8"); was placed in the if statement. As a result, the insertion was not messy, but when it was read out, it was ?????question mark one Heap.


[php]
$conn=mysql_connect('localhost','root','1234');
Mysql_select_db('kefei');
Mysql_query("set names utf8");
$result=mysql_query("select * from liuyan");
While($row=mysql_fetch_assoc($result)){
        var_dump($row);


}  


?>

$conn=mysql_connect('localhost','root','1234');
mysql_select_db('kefei');
mysql_query("set names utf8");
$result=mysql_query("select * from liuyan");
while($row=mysql_fetch_assoc($result)){
var_dump($row);


}


?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477372.htmlTechArticleIt took about 10 hours, and the page became more colorful after being coaxed by teacher Niu B. Then there was the competition. At that time, the time was two hours, and the computer room of the school was relatively stupid. It was ie6 and DW was the 2004 version....
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template