Forums

Gather information from PHP script from the page

joelseneque 17 Feb, 2010
Hi there,

I have a form that is showing in every Virtuemart item I have on my website.

I am wanting to make it so when they submit the form it sends to an address specified in the details of Virtuemart.

I have put a hidden field in the form that has:
<?php echo $email ?>

as its value

Though this is the error i am recieving:

Notice: Undefined variable: email in /var/www/html/rmbclient/aiac/components/com_chronocontact/chronocontact.html.php(180) : eval()'d code on line 1


Can anyone help me with this.
GreyHead 17 Feb, 2010
Hi joelseneque,

Basically you aren't defining the value of $email - that's what causes the error. Where do you expect to get the email address from?

Bob
joelseneque 17 Feb, 2010
I was getting it from a Virtuemart field. The field does work because i echo the same statement on my product page and it works.

Have you ever used virtuemart like this before?
GreyHead 17 Feb, 2010
Hi joelseneque,

You coudl try declaring it as global on the Virtue Mart page, otherwise you'll need to add the code to the ChronoForm to get it from the Virtuemart tables. ChronoForms has no automatic access to the info on the page. :-(

Bob
This topic is locked and no more replies can be posted.