Use a field value in php code?

Shows some Tutorials

Use a field value in php code?

Postby faber on Wed Jul 02, 2008 2:25 am

Hi :)

Let's suppose I have a "pwd" text field in my form. I want to send the md5 hash of pwd by email

In Email template i wrote:

<?php echo (md5({pdw})); ?>

but it didn't work

neither

<?php echo (md5($pdw)); ?>

What am I doing wrong? :blush:

Thank you in advance :silly:
ChronoForms FTW!
faber
Fresh Boarder
 
Posts: 5
Joined: Thu Jun 26, 2008 9:39 am
Location: Italy

Re:Use a field value in php code?

Postby GreyHead on Wed Jul 02, 2008 9:37 am

Hi faber,

The sequence isd important here. You might find that
Code: Select all
<?php echo (md5('{pdw}')); ?>
will work. Personally I'd play safe and use either:
Code: Select all
<?php echo (md5($_POST['pwd'])); ?>
I think that will work. If not, then you'll need to copy the Joomla 1.5.x JGet code over from the Autogenerated code tab.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3461
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:Use a field value in php code?

Postby faber on Thu Jul 03, 2008 9:16 am

Thank you so much Bob!

Just one note: the text in "code" tags was not delivered in the email :)
ChronoForms FTW!
faber
Fresh Boarder
 
Posts: 5
Joined: Thu Jun 26, 2008 9:39 am
Location: Italy

Re:Use a field value in php code?

Postby GreyHead on Sat Jul 05, 2008 5:27 am

Hi faber,

No - the Fireboard Forums parser is hightly individual and clearly doesn't care for emails. Actually I think it depends on some clever css that gets stripped out somewhere.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3461
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany


Return to ChronoForms How To

Who is online

Users browsing this forum: MSNbot Media and 2 guests