Home php drop-down list from the MYSQL database

drop-down list from the MYSQL database

Author

Date

Category

Good day!
Here I try to make the drop-down list in which the data would be loaded with the database … and the written code does not work … please tell me what is wrong

& lt; select name = "a" & gt; & lt;?
$ Result = MySQL_Query ("Select * from` Wayflag` WHERE `RN` = '". $ _ Get [' Rn ']. "' Order by 'Atitle`", $ Link);
$ myrow = mysql_fetch_array ($ result);
do.
{
Printf ("& lt; optional = '% s' & gt;% s & lt; / option & gt;", $ myrow ["obj"], $ myrow ["atitle"]);
}
while ($ myrow = mysql_fetch_array ($ result));
? & gt;
& lt; / select & gt;

Answer 1, Authority 100%

“does not work” – the concept is tensile. What exactly is wrong? What mistake gives?
Try the global variable $ _ GET [‘RN’] Translate to usual to request and write to such a macar:

$ rn = $ _get ['rn'];
$ Result = MySQL_Query ("Select * from` Wayflag` WHERE `RN` = '$ rn' Order by` atitle`", $ Link);
echo '& lt; select name = "a" & gt;';
While ($ myrow = mysql_fetch_array ($ result)) {
  Printf ("& lt; optional = '% s' & gt;% s & lt; / option & gt;", $ myrow ["obj"], $ myrow ["atitle"]);
}
Echo '& lt; / Select & gt;';

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions