Jump to content

Need help with block IP Page


linkmat

Recommended Posts

im trying to get a  <select>  with php  in a block with an another BDD

<form id="FormGeneratorScript" name="form" method="post" action="#ShowResult" class="FormGeneratorFull col_12">
			<div class="row"> 
           	<label class="col_4">Selectionnez votre salon : </label>
         
            <!--ON APELLE LA PAGE POUR SELECT ROOM-->
 			<select name="listroom" size="1" id="listroom" class="col_5">
  			<?php
				try
					{
						$DB = new PDO('mysql:host=localhost;dbname=flashchat', 'root', '');	}
						catch (PDOException $e){
						echo 'la base ne fonctione pas';
					}
						$sql = 'SELECT name,room_id FROM room';
						$req = $DB->query($sql);
						while($d = $req->fetch(PDO::FETCH_OBJ)){
					?>
		<!-- DEBUT CODE -->
				<option value="<?php echo $d->room_id; ?>"> <?php echo $d->name; ?> </option>	
				<?php } ?> 	<!-- FIN CODE -->
				</select> 
	  			</div>

but when im trying to  see nothing goes outs :(

 

Someone can help me on what i need to do

 

Thank and sorry for my english if  need more  details u can ask i will try to give more detail

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...