phpͶƱϵͳ
2018-06-22 05:30:23À´Ô´£ºÎ´Öª ÔĶÁ ()
ͶƱ·ÖÀà
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <?php $db= new Mysqli("localhost","root","root","db_0808"); $sql= "select * from fenlei"; $result=$db->query($sql); $data_c= $result->fetch_all(); ?> <table border="1"> <?php foreach ($data_c as $i){ echo" <tr><th><a href='vote.php?id={$i[0]}&is_radio={$i[2]}'>{$i[1]}</a></th></tr>"; } ?> </table> </body> </html>
ͶƱ½çÃæ
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <?php $id=$_GET['id']; $is_radio=$_GET['is_radio']; $db= new Mysqli("localhost","root","root","db_0808"); $sql= "select * from toupiao WHERE category_id='{$id}'"; $result=$db->query($sql); $data=$result->fetch_all(); ?> <form action="tongji.php" method="post"> <table> <tr> <td>Ãû×Ö</td> <td>ͶƱ</td> </tr> <?php if ($is_radio==1){ foreach ($data as $i){ echo "<tr> <td>{$i[1]}</td> <td><input type='radio' name='r' value='{$i[0]}'></td> </tr>"; } }else{ foreach ($data as $i){ echo "<tr> <td>{$i[1]}</td> <td><input type='checkbox' name='r[]' value='{$i[0]}'></td> </tr>"; } } ?> </table> <input type="submit" value="Ìá½»"> </form> </body> </html>
ͶƱ´¦Àí
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <table> <tr> <td>Ãû×Ö</td> <td>ƱÊý</td> </tr> <?php //$db= new Mysqli("localhost","root","root","db_0808"); require_once "../ZY/YIN.class.php"; $db = new YIN(); $ip=$_SERVER['REMOTE_ADDR'];//»ñÈ¡ip $sql="select count(*) from table2 where ip='{$ip}'"; $data = $db->StrQuery($sql); if($data!='0'){ echo "ÿ¸öÈËÒ»ÌìÖ»ÄÜͶһ´Î"; $r=$_POST['r']; if (is_array($r)){ $s=implode(',',$r); $sq="select * from toupiao where id in ({$s})"; }else{ $sq="select * from toupiao where id = {$r}"; } $qurle=$db->Query($sq); foreach ($qurle as $i){ echo "<tr><td>{$i[1]}</td><td>{$i[2]}</td></tr>"; } }else{ $sql = "INSERT INTO table2 VALUES (null,'{$ip}',DEFAULT)"; $squel=$db->strQuery($sql,0); if($squel){ // $upsql=update table_name set votes = votes + 1 where ... //È»ºó°ÑÊý¾Ýinsert into µ½table2ÖÐ $r=$_POST['r']; if (is_array($r)){ $s=implode(',',$r); $sql="update toupiao set count=(count+1) where id in ({$s})"; }else{ $sql="update toupiao set count=(count+1) where id = {$r}"; } $data=$db->query($sql,0); if ($data){ //echo "success"; if (is_array($r)){ $s=implode(',',$r); $sq="select * from toupiao where id in ({$s})"; }else{ $sq="select * from toupiao where id = {$r}"; } $qurle=$db->Query($sq); foreach ($qurle as $i){ echo "<tr><td>{$i[1]}</td><td>{$i[2]}</td></tr>"; } } } } ?> </table> </body> </html>
±êÇ©£º
°æȨÉêÃ÷£º±¾Õ¾ÎÄÕ²¿·Ö×ÔÍøÂ磬ÈçÓÐÇÖȨ£¬ÇëÁªÏµ£ºwest999com@outlook.com
Ìرð×¢Ò⣺±¾Õ¾ËùÓÐתÔØÎÄÕÂÑÔÂÛ²»´ú±í±¾Õ¾¹Ûµã£¬±¾Õ¾ËùÌṩµÄÉãÓ°ÕÕƬ£¬²å»£¬Éè¼Æ×÷Æ·£¬ÈçÐèʹÓã¬ÇëÓëÔ×÷ÕßÁªÏµ£¬°æȨ¹éÔ×÷ÕßËùÓÐ
ÉÏһƪ£º°²×°php
- PHPдUltraEdit²å¼þ½Å±¾ÊµÏÖ·½·¨ 2020-03-29
- php ´ø¶ººÅǧλ·ûÊý×ֵĴ¦Àí·½·¨ 2020-03-28
- PHPÈýÔªÔËËã·ûµÄ½áºÏÐÔ½éÉÜ 2020-03-28
- PHP¾²Ì¬Ñӳٰ󶨺ÍÆÕͨ¾²Ì¬Ð§ÂÊµÄ¶Ô±È 2020-03-28
- »ùÓÚphpÁ÷³Ì¿ØÖÆÓï¾äºÍÑ»·¿ØÖÆÓï¾ä 2020-03-28
IDC×ÊѶ£º Ö÷»ú×ÊѶ ×¢²á×ÊѶ ÍйÜ×ÊѶ vps×ÊѶ ÍøÕ¾½¨Éè
ÍøÕ¾ÔËÓª£º ½¨Õ¾¾Ñé ²ß»®Ó¯Àû ËÑË÷ÓÅ»¯ ÍøÕ¾Íƹã Ãâ·Ñ×ÊÔ´
ÍøÕ¾ÁªÃË£º ÁªÃËÐÂÎÅ ÁªÃ˽éÉÜ ÁªÃ˵ãÆÀ Íø׬¼¼ÇÉ
ÐÐÒµ×ÊѶ£º ËÑË÷ÒýÇæ ÍøÂçÓÎÏ· µç×ÓÉÌÎñ ¹ã¸æ´«Ã½
ÍøÂç±à³Ì£º Asp.Net±à³Ì Asp±à³Ì Php±à³Ì Xml±à³Ì Access Mssql Mysql ÆäËü
·þÎñÆ÷¼¼Êõ£º Web·þÎñÆ÷ Ftp·þÎñÆ÷ Mail·þÎñÆ÷ Dns·þÎñÆ÷ °²È«·À»¤
Èí¼þ¼¼ÇÉ£º ÆäËüÈí¼þ Word Excel Powerpoint Ghost Vista QQ¿Õ¼ä QQ FlashGet ѸÀ×
ÍøÒ³ÖÆ×÷£º FrontPages Dreamweaver Javascript css photoshop fireworks Flash
³ÌÐòÉè¼Æ£º Java¼¼Êõ C/C++ VB delphi
- Photoshop»æÖÆÁ¢Ìå·ç¸ñµÄ΢Ц±íÇé
- PSÎÄ×ÖÌØЧ½Ì³Ì£ºÖÆ×÷¹«Â·ÉϸöÐÔµÄÍ¿Ñ»
- PhotoshopÉè¼Æ¾í±ßЧ¹ûµÄ±äÐνð¸ÕµçÓ°
- PSÉ«²ÊÐÞ¸´½Ì³Ì£ºÀûÓÃÉ«½×¹¤¾ß¿ìËÙ¸øºì
- PS°ë͸Ã÷ÎïÌå¿Ùͼ£ºÀûÓÃͨµÀÑ¡Çø¹¤¾ß¿Ù
- PSº£±¨Éè¼Æ¼¼Çɽ̳̣ºÑ§Ï°ÖÆ×÷¸öÐԵč
- PSͼƬÌØЧÖÆ×÷½Ì³Ì£ºÑ§Ï°¸øÌúËþͼƬÖÆ
- ѧϰÓÃphotoshop°Ñ»ë×ǵĺ£Ë®ÕÕƬºóÆÚ
- PS¹Å·çÕÕƬ½Ì³Ì£º¸ø¹Å·çÃÀÅ®´òÔì³öÅ®ÏÀ
- PS¸öÐÔÈËÎﺣ±¨ÖÆ×÷£ºÉè¼Æ´´ÒâʱÉеIJ£
- °Ù¶ÈÍøÅÌÊÓƵ½âÎö£¬»ñÈ¡ÕæʵԴµØÖ·
- ×îÈ«ÃæµÄ²¤²ËÔ´ÂëÏÂÔØ,Ö§³ÖÐÞ¸´£¬¶þ´Î
- ÀûÓÃPHPÁ¬½ÓÊý¾Ý¿â¡ª¡ªÊµÏÖÓû§µÇ¼ע
- ×îÐÂÁùºÏ²ÊͶעÍøÕ¾´î½¨³ö×âÍøվϵͳԴ
- PHP-ÎÊÌâ´¦ÀíFatal error: Uncaught Er
- error:0906D064:PEM routines:PEM_read
- С˵ÍøÕ¾½¨Éè,С˵ÍøÕ¾ÖÆ×÷,С˵ÍøÕ¾Ô´
- PHPÏÂʵÏֶ˿ڸ´ÓÃ/½Ù³Ö
- php+layuiʵÏÖͼƬÉÏ´«ÓëÔ¤ÀÀ
- phpÅжÏÊÇ·ñΪʱ¼ä´Á