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

Se trata de esto, el codigo me muestra un form para agregar un nuevo registro hasta ahi todo bien pero cuando incluyo el codigo del combo de la siguiente forma ya no me muestra el formulario.

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">
                [COLOR="Red"]'
                 
$link=mysql_connect("localhost","root","cinmediata") or

die(
"Problema en la conexion");

mysql_select_db("contratacion",$link)or

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

$result=mysql_query("select * from fuentesrec order by id_fuente" ,$link);


if(
$row mysql_fetch_array($result)){ 

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

}
'[/COLOR]

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;
    }