• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[PHP] While/If function dont work

RaikND

facebook.xenoria.org
Joined
May 12, 2010
Messages
942
Reaction score
10
Location
Spain
There is a code! i want select ALL FIELDS with " * ", and now i want make a redirect from " page.php " to a " page.php?dis=var"
PHP:
if(!isset($disco)){
$queryD = mysql_query('SELECT * FROM `listas`')
another query working
echo 'Bla bla bla bla <a href="page.php?disco='.url.'">More...</a>';
}elseif($disco == $queryD['url']){
foreach($queryD as $info){
echo '<p>Welcome to the '.$info['dname'].'</p>';
}}
?>

any can help me plx?
 
Last edited:
its a one system from vote, first query will working for show "votes, name, description & etc"
and second query working for each web, show all info from each web

Sorry for my bad eng :S

EDIT:
this new programming!
PHP:
<?php
if(!isset($disco)){
$queryD = mysql_query('SELECT * FROM `listas`')
another query working
echo 'Bla bla bla bla <a href="page.php?disco='.url.'">More...</a>';
}while($info = mysql_fetch_array($queryD)){
elseif($disco == $info['url']){
echo '<p>Working? '.$info['dname'].'</p>';
}}
?>

Full code:
PHP:
<?php
$disco = $_GET['disco'];
if (!isset($disco)){
$queryA = mysql_query('SELECT `openClose`, `dnombre`, `url` FROM `listas` ORDER BY `mGusta` DESC;');
$queryB = mysql_query('SELECT `openClose`, `dnombre`, `url` FROM `listas` ORDER BY `mGusta` DESC;');
$queryC = mysql_query('SELECT * FROM `listas` ORDER BY `mGusta` DESC LIMIT 10;');
$queryD = mysql_query('SELECT * FROM `listas`;');
//$queryD = mysql_query('SELECT * `url`, `dnombre`, `id`, `eventoV`, `eventoS`, `eventoD`, `dia`, `mes`, `descripcion`, `acompa`, `precio`, `mGusta`, `nGusta`, `openClose`  FROM `listas`');

echo '<p><font size="4">Las listas de NightStyleBcn.<strong>com</strong></font></p><hr /><br>
                <p><div id="mostrarDiv"><a href="javascript:mostrardiv();"><font size="3"><strong>Seleccionar Discoteca/Club</font></strong></a></div></font></a></p>
				<hr/><div id="flotante" style="display:none;">
				<p align="center"><caption><strong><font color="seagreen" size="3"><em>Discotecas abiertas</em></font></strong></caption></p>
<table>';
while($lista = mysql_fetch_array($queryA)) {
if($lista['openClose'] == 'open'){
echo '<tr>
<td><a href="?disco='.$lista['url'].'"><img src="http://otland.net/f16/images/'.$lista['dnombre'].'.png" alt="'.$lista['dnombre'].'"></img></a></td>
</tr>';
}else{
echo 'No hay ninguna <strong>Discoteca o Club</strong> abierto.';
}}
echo '</table>
<p align="center"><caption><strong><font color="red" size="3"><em>Discotecas cerradas</em></font></strong></caption></p>';
echo '<table>';
while($lista = mysql_fetch_array($queryB)){
if($lista['openClose'] == 'close'){
echo '<tr>
<td><img src="http://otland.net/f16/images/'.$lista['dnombre'].'.png" alt="'.$lista['dnombre'].'"></img></td>
</tr>';
}else{
echo 'No hay ninguna <strong>Discoteca o Club</strong> cerrado.';
}}
echo '</table>
<p align="right"><a href="javascript:cerrar();"><font size="2"><strong>Cerrar Ventana</strong></font></a></p><hr /></div>
<table><p align="center"><font size="3"><strong>Top 10 Mejores Discotecas/Clubs</strong></font></p><hr />';
while($lista = mysql_fetch_array($queryC)){
echo '				
				<tr align="center">
				<th></th>
				<th>Resumen</th>
				<th></th>
				<th><img src="http://otland.net/f16/images/Y.png"></img></th>
				<th><img src="http://otland.net/f16/images/N.gif"></img></th>
				</tr>		
<tr align="center">
				<td><img src="http://otland.net/f16/images/'.$lista['dnombre'].'.png" alt="'.$lista['dnombre'].'"></img></td>
				<td><strong><center>'.$lista['dnombre'].'</strong> es un club de m&uacutesica electr&oacutenica completamente nuevo, en el que los espacios interiores y el exteriores se funden para crear una nueva experiencia de clubbing de calidad en Barcelona</center></td>
				<td><a href="listas.php?disco='.$lista['url'].'"><strong>Mas...</strong></a></td>
				<td><a href=""><strong>'.number_format($lista['mGusta'], 0, '', '.').'</strong></a></td>
				<td><a href=""><strong>'.number_format($lista['nGusta'], 0, '', '.').'</strong></a></td>
</tr>';
}
echo '</table>';
}while($info = mysql_fetch_array($queryD)){
elseif($disco == $info['url']){
echo '<p>Working? '.$info['dname'].'</p>';
}}
?>
 
Last edited:
Back
Top