집 >
백엔드 개발 >
PHP 튜토리얼 >
PHP HTML JavaScript MySQL代码如何互相传值的方法分享_PHP
PHP HTML JavaScript MySQL代码如何互相传值的方法分享_PHP
WBOY
풀어 주다: 2016-06-01 12:08:51
원래의
934명이 탐색했습니다.
1.PHP
a.PHP -> HTML & JavaScript
额 超简单,我也要写= =~
html代码中
/> JavaScript代码中 复制代码 代码如下:
b.PHP MySQL
php代码中 复制代码 代码如下: $dbcnx = @mysql_connect ( "localhost", "root", "1234" ); if (! $dbcnx) { echo ("Unable to connect to the " . "database server at this time."); exit (); }
if (! @mysql_select_db ( "pms" )) { echo ("Unable to locate the joke " . "database at this time."); exit (); } mysql_query ( "SET NAMES 'GB2312'" );
$q=mysql_query("select * from ability where ALV = 1"); while($row=mysql_fetch_array($q)){ $array1[] = $row[AName]; } ?>