CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 modify variable before insert

Print topic Send  topic

Author Message
ioman

Posts: 4
Posted: 04/23/2004, 1:16 PM

I'm new to php-oop so please bear with me....

I have a form with an input text box and a dropdown list. I want to contatenate these two variables before inserting them into MySQL.

To this end, I've created a "Before Insert" event with the following custom code:

global $prefs;
$prefs->user_email->SetValue($user_email . "@" . $domain);

This action does update the $user_email variable (I end up with a value of '@') but it's not capturing the original values of $user_email and $domain.

Obviously there's more to this. Do I need to call a CCGetValue or some other function to obtain the values of my two variables?
View profile  Send private message
datadoit.com
Posted: 04/23/2004, 2:21 PM

Maybe:

global $prefs;
$prefs->user_email->SetValue($prefs->input_text_box->GetValue() . "@" .
$prefs->dropdown_list->GetValue());



"ioman" <ioman@forum.codecharge> wrote in message
news:54089799642fc2@news.codecharge.com...
> I'm new to php-oop so please bear with me....
>
> I have a form with an input text box and a dropdown list. I want to
contatenate
> these two variables before inserting them into MySQL.
>
> To this end, I've created a "Before Insert" event with the following
custom
> code:
>
> global $prefs;
> $prefs->user_email->SetValue($user_email . "@" . $domain);
>
> This action does update the $user_email variable (I end up with a value of
'@')
> but it's not capturing the original values of $user_email and $domain.
>
> Obviously there's more to this. Do I need to call a CCGetValue or some
other
> function to obtain the values of my two variables?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

ioman

Posts: 4
Posted: 04/23/2004, 2:43 PM

Yep. Just what I thought...

I modified the code to:

global $prefs;
$prefs->user_email->SetValue($prefs->user_email->GetValue() . "@" . $prefs->domain->GetValue());

and it works beautifully.

Thanks. Sorry if I've wasted anyone's time.
View profile  Send private message

Add new topic Subscribe to topic   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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