Tomasz
|
| Posted: 04/28/2002, 11:46 AM |
|
I need textbox field if the form is in insert mode, and label if it's in update mode.
I'm trying to use solution described by Nicole (1/18/02 1:35:48 AM), but something is going wrong.
Field in form is label+html, before show event:
if ($flduser_id == "" || $flduser_id == NULL)
{ $fldlogin = "<input type=\"text\" name=\"login\" maxlength=\"12\" size=\"10\" value=".$fldlogin.">"; }
and it works.
after insert event:
$last_id = mysql_insert_id();
$db->query("UPDATE users SET login = ".$fldlogin." WHERE user_id=".$last_id);
but browser says e.g:
Database error: Invalid SQL: UPDATE users SET login = WHERE user_id=8
so variable $fldlogin is empty
why?
|
|
|
 |
Tomasz
|
| Posted: 04/29/2002, 1:24 AM |
|
forget it.
I've modified custom action adding this field to sql.
|
|
|
 |
Nicole
|
| Posted: 04/29/2002, 6:43 AM |
|
Tomasz,
check "login" field to be added to the form and has the name "login" on field properties in 'Variable Name' field.
|
|
|
 |
|