![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
16/02/2007, 10:08
|
| | Fecha de Ingreso: abril-2006 Ubicación: Colombia
Mensajes: 648
Antigüedad: 18 años, 9 meses Puntos: 3 | |
Re: str_replace ??? Hola
Bueno, pues a mi me funciona bien!!
prueba creando otro archivo llamado prueba.php y pegale este codigo:
<?
// en mysql_connect cambia los parametros a los tuyos
$link = mysql_connect("localhost","root","root");
// y en mysql_select_db pon el nombre de tu base de datos
mysql_select_db("FabianChacon-Centrodebelleza");
$query= "SELECT DISTINCT(Bildart) FROM BilderExtraInfos WHERE Bildart <> '' ORDER BY Bildart ASC";
if ($debug) {
echo $query."<br><br><br>";
}
if (($erg = mysql_query ($query)) == FALSE)
{
echo "Fehler bei der SQL-Abfrage: Fehlercode " . mysql_errno () . " - " . mysql_error ();
}
else {
?>
<select name='Bildart' id='Bildart' size='5' multiple>
<option value=''>- No Preferences -</option>
<?
while ($arr = mysql_fetch_array($erg))
{
$arr['Bildart'] = str_replace("farbe", "Colour",$arr['Bildart']);
$arr['Bildart'] = str_replace("grau", "Black/White",$arr['Bildart']);
?>
<option value="<?=$arr['Bildart']?>"><?=$arr['Bildart']?></option>";
<?
}
?>
</select>
<?
}
?>
Oye, y una pregunta, que navegador usas??? prueba en firefox, suerte. |