0

My page stops loaded every time I turn on the code below... it looks correct and the tables and fields are correct.

<select name="common" style="width: 136px;">    
<?php
    $group1 = mysql_fetch_array(mysql_query("SELECT country FROM lang_list WHERE grouping = '1' ORDER BY p_order"));
    while($row = $group1){
        echo "<option value=\"$group1\">$group1</option>\n";
    }
?>
</select>
0

2 Answers 2

2
<?php
    $group1 = mysql_query("SELECT country FROM lang_list WHERE grouping = '1' ORDER BY p_order");
    while($row = mysql_fetch_array($group1)){
        echo "<option value=\"$row[country]\">$row[country]</option>\n";
    }
?>
Sign up to request clarification or add additional context in comments.

Comments

1

Try this:

<select name="common" style="width: 136px;">     
<?php 
        $recordset = mysql_query("SELECT country FROM lang_list WHERE grouping = '1' ORDER BY p_order") or die("Error found: " . mysql_error());
    while($row = mysql_fetch_array($recordset)){ 
        echo "<option value=\"".$row['country']."\">".$row['country']."</option>\n"; 
    } 
?> 
</select> 

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.