Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/08/2009, 11:53
kike278
 
Fecha de Ingreso: abril-2008
Mensajes: 62
Antigüedad: 16 años
Puntos: 1
Pregunta Ayuda con comillas dobles y simples

Tengo el siguiente codigo (tomado de XajaxGrid)
Código PHP:
function formAdd(){
    
$html '
            <!-- No edit the next line -->
            <form method="post" name="f" id="f">
            
            <table border="1" width="100%" class="adminlist">
            <tr>
                <td nowrap align="left">Last Name*</td>
                <td align="left"><input type="text" id="lastname" name="lastname" size="25"></td>
            </tr>
            <tr>
                <td nowrap align="left">First Name</td>
                <td align="left"><input type="text" id="firstname" name="firstname" size="25"></td>
            </tr>
            <tr>
                <td nowrap align="left">E-Mail</td>
                <td align="left"><input type="text" id="email" name="email" size="35"></td>
            </tr>
            <tr>
                <td nowrap align="left">Origin</td>
                <td align="left"><input type="text" id="origin" name="origin" size="35"></td>
            </tr>
            <tr>
                <td colspan="2" align="center"><button id="submitButton" onClick=\'xajax_save(xajax.getFormValues("f"));return false;\'>Continue</button></td>
            </tr>
            </table>
            </form>
            * Obligatory fields
            '
;
        
        return 
$html;
    } 
Y quiero agregar un combo el cual cargo desde la BD

Código PHP:

<?php


$link
=mysql_connect("localhost","xxx","xxx") or

die(
"Problema en la conexion");

mysql_select_db("xxxxx",$link)or

die(
"Problema en la seleccion de la base de datos");

$result=mysql_query("select * from usuarios where empresa='$empresa' and seccion like '%RH%' order by nombre" ,$link);


if(
$row mysql_fetch_array($result)){ 

echo 
'<select name= "nombreej" id="nombreej">';
echo 
'<option value="1">Seleccionar</option>';
do { 
       echo 
'<option value= "'.$row["usuario"].'">'.$row["nombre"]." ".$row["apaterno"]." ".$row["amaterno"].'</option>';
} while (
$row mysql_fetch_array($result)); 
echo 
'</select>';

}

?>
Como podria insertar ese codigo ?
El problema es por las comillas o a q se debe que cuando inserto el codigo me no muestra nada .?
Saludos, grax