Hi there
I want to do following code:
<?php
$mail = "{email}"
$mail = urlencode($mail);
?>PHP is set to output, but user defined variables are parsed after that.
How can I do this?
Best, Thomas
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
October 02, 2012 7:38am
Subscribe [1]#1 / Oct 02, 2012 7:38am
Hi there
I want to do following code:
<?php
$mail = "{email}"
$mail = urlencode($mail);
?>PHP is set to output, but user defined variables are parsed after that.
How can I do this?
Best, Thomas
#2 / Oct 03, 2012 3:46pm
Hi Thomas,
You would need to access that through the userdata object:
$this->EE->session->userdata('email');Since that is PHP as well, it will parse at the proper time.
~
#3 / Oct 04, 2012 5:56am
thx Dan!
What about custom member fields?
#4 / Oct 05, 2012 2:49pm
You can access those with an SQL query if you need to. They are available in the EE object via PHP like basic user data.
You can use SQL in PHP or with the Query Module. The Query module is the safest way to do that.
Let me know if you have any questions.
Cheers,