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

 PHP Tutorial Apendix Error

Print topic Send  topic

Author Message
Paulo Fagiani
Posted: 08/26/2002, 8:47 AM

Hi folks,

I was just reading the tutorial and I found that the PHP section have something missing and some misspelling too...
I tried to port the ASP code to PHP... it works in half way... because it is considering EditMode = true even in the insert form... so the "else" never runs... any light? am I missing something important? Here follows the code:

function tasks_user_id_assign_by_BeforeShow() { //tasks_user_id_assign_by_BeforeShow @13-B49E3110

//Custom Code @20-2A29BDB7
// -------------------------
global $tasks;
global $DBIntranetDB;
if( $tasks.EditMode )
{
$tasks->user_id_assign_by->SetValue(CCDLookUp("emp_name", "employees", " emp_id="
. $DBIntranetDB->ToSQL($tasks->user_id_assign_by->GetValue(), ccsInteger), $DBIntranetDB));
}
else
{
$tasks->user_id_assign_by->SetValue(CCDLookUp("emp_name", "employees", " emp_id="
. $DBIntranetDB->ToSQL(CCGetUserID(), ccsInteger), $DBIntranetDB));
}
// -------------------------
//End Custom Code

} //Close tasks_user_id_assign_by_BeforeShow @13-FCB6E20C
Ghostman
Posted: 08/26/2002, 2:09 PM

I'm having the same problem, please help!
Rick
Posted: 08/28/2002, 1:12 AM

Guys,
re-download the tutorial. Looks like you're using outdating version. The one I've downloaded yesterday is free of misspell. The code on page 190 should be:
global $tasks;
global $DBIntranetDB;
if( $tasks->EditMode )
{
...

and it works!

   


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.