| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How to include PHP code into static page | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
How to include PHP code into static page
Hello guys,
i would like to know how i could include a php code into a static page? in my first page i have a form calling the php code Code:
Code:
Thanks a lot!
__________________
X-Cart version 4.2 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: How to include PHP code into static page
You wouldn't want to include such code into your static page, you'd want your static page form to post to a different php file.
FYI, that code is amazingly unsecure and open to being used for spam. |
|||||||||
#3
|
|||||||
|
|||||||
Re: How to include PHP code into static page
Thanks for the fast answer.
Do you have any idea how i could upgrade or change this code to make it more secure? Thanks a lot!
__________________
X-Cart version 4.2 |
|||||||
#4
|
|||||||
|
|||||||
Re: How to include PHP code into static page
As Jon has already stated, you actually need to have the static page send a POST request to the PHP file to send the e-mail. Also as already stated that code is horrifically insecure, always, sanitize user input because it cannot be trusted. This is better:
Note: This assumes you are using PHP5 and have the filter extension available. Also note that this code has not been tested. Code:
|
|||||||
|
|||
X-Cart forums © 2001-2020
|