Hi,
I want to call a PHP function from an HTML href, is this possible?
Basically the page I have grabs data from the URL string and displays it in a table. The function I have created sends this data in an email. I have a send results link underneath the table that I need to run the email function I have. Is this possible?
thanks
PHP function from an HTML href
Moderator: General Moderators
-
danjpalmer
- Forum Newbie
- Posts: 5
- Joined: Fri Dec 04, 2009 6:45 am
Re: PHP function from an HTML href
This function must be in some script callable through URL.
There is no possibility to call directly the function. Only script containing the function.
Code: Select all
<a href="http://smth.com/email.php?to=rcpt@domain.com">Send mail</a> -
danjpalmer
- Forum Newbie
- Posts: 5
- Joined: Fri Dec 04, 2009 6:45 am
Re: PHP function from an HTML href
Hi,
Thanks for the information. I will give this a go
Thanks for the information. I will give this a go
-
danjpalmer
- Forum Newbie
- Posts: 5
- Joined: Fri Dec 04, 2009 6:45 am
Re: PHP function from an HTML href
does the same apply from within an onSubmit within a form?
-
danjpalmer
- Forum Newbie
- Posts: 5
- Joined: Fri Dec 04, 2009 6:45 am
Re: PHP function from an HTML href
ok new angle....
Can I get PHP to launch the a new email message in the default email client? So for example I click a button and it passes data to a new email in Outlook?
thanks again for your help.
Can I get PHP to launch the a new email message in the default email client? So for example I click a button and it passes data to a new email in Outlook?
thanks again for your help.
Re: PHP function from an HTML href
That would be using:
Code: Select all
<a href="mailto:email@example.com">Email Us</a>-
danjpalmer
- Forum Newbie
- Posts: 5
- Joined: Fri Dec 04, 2009 6:45 am
Re: PHP function from an HTML href
I get that bit, I meant the passing of data into the email body that has just been opened?