Thank you Razzak - I will give it a try. Steve Vellella Office: 409-944-3904 Cell: 520-250-6498
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak Memon Sent: Friday, January 27, 2012 2:54 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: PHP and insert row At 03:30 PM 1/27/2012, Steve Vellella wrote: >I am trying to insert a row of data into R:Base to track the IP address, >login date and time, and user name for successful logins for a web site >using PHP/Oterro/Apache. > >I am able to retrieve all of the data points that I need, but I cannot >figure out the syntax to "Insert a Row" into the rbase table. Steve, Here's an R:PHP snippet that INSERTs a row after a successful or failed login attempt to access R:BASE application. ## ACCESS LOGS function application_access_log($strUser,$val){ global $dbObj, $dbcnx; $sql = "INSERT INTO AplicationAccessLog (LoginDate,LoginTime,UserID,terminalID,ApplicationModule,AccessCode,Successf ul) VALUES('".date('m/d/Y')."','".date('h:i A')."','".$strUser."','".$_SERVER['REMOTE_ADDR']."','RRBYW18','".$_SESSION[' AccessCode']."','{$val}')"; $dbcnx->query($sql,FALSE); Notice the AplicationAccessLog table with the following columns: . LoginDate (DATE) . LoginTime (TIME) . UserID (TEXT 20) . TerminalID (TEXT 20) . ApplicationModule (TEXT 20) . AccessCode (INTEGER) . Successful (TEXT 1) Hope that helps! There is more to this code that sets up the environment and all global/session variables configured using R:BASE eXtreme 9.x, Oterro 9.x on Apache 2.2.21 and PHP 5.2.17 server. If you require further assistance, you may contact our dedicated R:Web Development Team at [email protected]. Very Best R:egards, Razzak.

