CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 changing field type and inserting values into db

Print topic Send  topic

Author Message
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.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.