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?
|
|
|
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.
|
|
|
|