Jump to content

Help for mysql_query!


alena1347

Recommended Posts

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 


?>
Link to comment
https://forums.phpfreaks.com/topic/276714-help-for-mysql_query/
Share on other sites

  On 4/9/2013 at 12:42 PM, Barand said:

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

  On 4/9/2013 at 3:19 PM, Barand said:

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....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.