How to read the database from the PHP drop-down menu
Now click on the line to isolate the line from the database, but want to read the vehicle through the selected line
Table Line
Linename
213
223
225
267
Table Busname
Linename Busname
213 781
213 782
213 783
223 817
223 818
225 901
267 100
The code is as follows:
Select route
$link =mysql_connect ("127.0.0.1", "root", "12345678"); if (! $link) echo "Not connected successfully!"; mysql_select_db ("Busap", $link); Select database//control query condition $q = "SELECT * From line ORDER by linename ASC"; mysql_query ("SET NAMES GB2312"); Prevent garbled $rs = mysql_query ($q); Gets the data set $assoc = Mysql_num_rows ($RS);////The number of rows affected, originally used Mysql_fetch_assoc $row =mysql_fetch_array ($RS); Just add back to this line. $XL = $row [Linename]?>Select route
Vehicle self-numbering
$link =mysql_connect ("127.0.0.1", "root", "12345678"); if (! $link) echo "Not connected successfully!"; mysql_select_db ("Busap", $link); Select database//control query condition $q = "SELECT * from ' {$_request[' select '} ' ORDER by linename ASC"; mysql_query ("SET NAMES GB2312"); Prevent garbled $rs = mysql_query ($q); Gets the data set $assoc = Mysql_num_rows ($RS);////The number of rows affected, originally used Mysql_fetch_assoc $row 1=mysql_fetch_array ($RS); Just add back to this line. ?>Select vehicle
Reply to discussion (solution)
Select route
Select route
Vehicle self-numbering
Select vehicle