I'm having troubles trying to insert form data into a mysql db, the
thing is my client wants table data to be splitted, I mean some data 
comes from the first form, and the rest from another form.
Then this is a portion of the php script.

// Add together proper fields to enter birth date
$fecha_nac = $ano_nac  + "-" + $mes_nac + "-" + $dia_nac;

// Open mysql db

// SQL query insert all data into a table
$query = "insert into RegistroPersonas values
                ('".NULL."','".$nombre."', '".$apellido."', '".NULL."', 
'".$ciudad."', '".NULL."',   '".NULL."', '".$pais."', '".$telefono."', 
'".$fax."', '".$email."', '".$login_usuario."', '".$clave."', 
'".$fecha_nac."',  '".NULL."',  '".NULL."' '".$sexo."',  '".NULL."',  
'".NULL."', '".NULL."', '".NULL."' )";
----> My problem is NOTHING gets inserted !!! 
----> I filled all empty fields with NULL values
----> It connects to the db but does nothing else
// Do query  
$result = mysql_query($query);

// this script has a form at the end, where the remaining fields are
// filled
// and calls the next script, where the tables are altered
// there and the empty fields filled with the values retrieved

I suppose to use Update in the next script , to enter remaining
data, but I'm not sure because the first field auto increments, 
and is the primary key.


AXIS Computers

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to