![]() |
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:
<form name="form" action="filename.php" method="post"> Code:
<?php Thanks a lot! |
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. |
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! |
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:
<?php |
All times are GMT -8. The time now is 02:21 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.