PDA

View Full Version : PHP and mysql help



Jordan,
28-12-2008, 03:49 PM
Im trying to order the list on the request line by name ive added



//$result = mysql_query("SELECT * FROM staff ORDER BY username") ;


The rest of the code is

if($_GET["op"] == "reg") {

//$result = mysql_query("SELECT * FROM staff ") ;

//while($worked = mysql_fetch_array($result)) {

//$get_word = $worked['username'];

//if(preg_match("/$get_word/i", "$servertitle")) { $dj_name = "$get_word"; }

//}

$dj_name = addslashes($_POST["dj_name"]);

if($dj_name == "Choose One...") { echo "<font color='black' face='Verdana' size='1'><b><font face=Verdana color=black size=2>You Need To Select A DJ Or No One Will Recieve It !<br>"; exit; }


Thanks if you can help

iUnknown
28-12-2008, 04:08 PM
That line is commented out, that's as good as nothing (that bit of PHP is not even run). You're editing the wrong line.

Jordan,
28-12-2008, 04:10 PM
ah ok thanks any idea on what line lol

Jackboy
28-12-2008, 05:13 PM
//
is a way of commenting on a line of code in PHP.

Take away the // on the lines that you wish to work :p

eg.

// mysql_query();
would produce nothing, whilst
mysql_query(); OBVIOUSLY WITH A QUERY INSIDE would do something ;)

Want to hide these adverts? Register an account for free!