Passing Field value in an External Script

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
nserpiot
User
Posts: 49

Passing Field value in an External Script

Post by nserpiot »

I need to pass the Field value, as a variable in a Server script, in order to call a PHP page.
I know that for getting the value is : $myVar = CurrentPage()->myField->CurrentValue;
How can I use $myVar after a DELETE page finishes, so as to run a server script using this variable ?


scs
User
Posts: 694

Post by scs »

How about
$SESSION["var"] = CurrentPage()->myField->CurrentValue; // Assign
unset($
SESSION["var"]); // Release


nserpiot
User
Posts: 49

Post by nserpiot »

OK, but how can I take the value of a Field that is going to be deleted ?


scs
User
Posts: 694

Post by scs »

Try

$_SESSION["var"] = $rs["the_field_name"];


nserpiot
User
Posts: 49

Post by nserpiot »

No, it does not returns the value.


nserpiot
User
Posts: 49

Post by nserpiot »

Is it possible to make a select before the Delete and take the value needed ?
Please sent me an example, since I can not accomplished it.

eg $myvar = ew_Execute("SELECT FileIN FROM test WHERE FileIN=" . $rs["FileIN"]);


scs
User
Posts: 694

Post by scs »

Place the code in Row_Deleting (not Row_Deleted)


nserpiot
User
Posts: 49

Post by nserpiot »

Τhat's OK. Thank you scs.But can I busy you a little more?
I can not use the SELECT through ew_Execute and the mistake is always a syntax error. Could you give me an example lile the below ?

ew_Execute("SELECT FileIN FROM test WHERE FileIN=" . $rs["FileIN"]);


scs
User
Posts: 694

Post by scs »

nserpiot wrote:
ew_Execute("SELECT FileIN FROM test WHERE FileIN=" . $rs["FileIN"]);

for string
where fieldname = 'ABC';

for numeric
where fieldname = 123;

see the different?

Look like your FileIN is string, so the correct syntax is
WHERE FileIN = '". $rs["FileIN"] ."';";

Hope this help.


Post Reply