alena1347 Posted April 9, 2013 Share Posted April 9, 2013 Help me with this simple query please 1)The code below does not show any result and the page dies after that query 2)The below code does not show any error and it just stops the page to load after the query 3)The main thing here is it does not show any error and stops executing what could be the problem. <?php include('conn.php'); $sqls=mysql_query("SELECT * FROM languages")or die(mysql_error()); while($infos=mysql_fetch_array($sqls)) { ?> <option value="<?php echo str_replace(" ","",$infos['name']); ?>"><?php echo $infos['name']; ?></option> <?php } ?> Quote Link to comment Share on other sites More sharing options...
Jessica Posted April 9, 2013 Share Posted April 9, 2013 You should turn on PHP error reporting and find out. Quote Link to comment Share on other sites More sharing options...
Barand Posted April 9, 2013 Share Posted April 9, 2013 Apart from missing <select>... </select> tags I see no problem and no obvious cause. When I ran it using one of my tables with a name field I got a list of options. Perhaps the cause comes later in the code Quote Link to comment Share on other sites More sharing options...
alena1347 Posted April 9, 2013 Author Share Posted April 9, 2013 Apart from missing <select>... </select> tags I see no problem and no obvious cause. When I ran it using one of my tables with a name field I got a list of options. Perhaps the cause comes later in the code I have 3 drop downs and as soon as the code passes from this query it stops and other all dropdowns are loaded on browser and the later part does not have any php code. QUeries till now showed error but this one is not showing a error too Quote Link to comment Share on other sites More sharing options...
Barand Posted April 9, 2013 Share Posted April 9, 2013 You won't get a dropdown without the select tags but you should get a list of the names - check the HTML source that is generated Quote Link to comment Share on other sites More sharing options...
alena1347 Posted April 10, 2013 Author Share Posted April 10, 2013 You won't get a dropdown without the select tags but you should get a list of the names - check the HTML source that is generated sorry I was not able to explain properly. The remaining dropdows that are after the query are not been loaded though they have nothing to do with php.... Quote Link to comment Share on other sites More sharing options...
Barand Posted April 10, 2013 Share Posted April 10, 2013 You should turn on PHP error reporting and find out. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted April 10, 2013 Share Posted April 10, 2013 what does the "view source" of the page show? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.