How to integrate a custom php script into my Nicepage website

v.piasta
31 Posts
v.piasta posted this 27 August 2022
Ask a Question

I have written a custom php script that receives data via a POST form and then creates an output on the same page after some complex calculations. The script is complete with "header" and "body" and works well as a standalone script that I can call via a link on any of my web pages.
I would like to integrate it into a new nicepage page with its header and footer, so it has the same appearance as all the other pages. My website is exported to HTML, not using Wordpress or Joomla.
I understand that I can only paste the "body" part of my script and may have to change some style information, as the CSS in the information is part of the Nicepage framework.
Unfortunately, the page shows nothing in the preview.

I have looked at similar questions, and most refer to sending emails and don't cover this issue. In one case the answer was
"PHP control is only for the WP and Joomla exports", but this answer is 3 years old. Since then Nicepage has had many new versions. I am wondering if there is now a solution.

In my view, PHP execution should depend only on the server's ability. My server works well with my script. So, what is it in Nicepage that impedes the execution?

In case there is really no way, I could imitate the general header and footer in my script to give it the same appearance. The only thing that I have not clear is how to apply the language selection in the header. Does anybody know how to do it?

I have written a custom php script that receives data via a POST form and then creates an output on the same page after some complex calculations. The script is complete with "header" and "body" and works well as a standalone script that I can call via a link on any of my web pages. I would like to integrate it into a new nicepage page with its header and footer, so it has the same appearance as all the other pages. My website is exported to HTML, not using Wordpress or Joomla. I understand that I can only paste the "body" part of my script and may have to change some style information, as the CSS in the information is part of the Nicepage framework. Unfortunately, the page shows nothing in the preview. I have looked at similar questions, and most refer to sending emails and don't cover this issue. In one case the answer was "PHP control is only for the WP and Joomla exports", but this answer is 3 years old. Since then Nicepage has had many new versions. I am wondering if there is now a solution. In my view, PHP execution should depend only on the server's ability. My server works well with my script. So, what is it in Nicepage that impedes the execution? In case there is really no way, I could imitate the general header and footer in my script to give it the same appearance. The only thing that I have not clear is how to apply the language selection in the header. Does anybody know how to do it?

Last edited 27 August 2022 by v.piasta

Vote to pay developers attention to this features or issue.
9 Replies
Order By: Standard | Newest
Support Team
Support Team posted this 27 August 2022

Hello,
Thanks for contacting us
As it was mentioned before and after, PHP code won't work in exported HTML websites. And in Nicepage for now no any plans to support PHP in exported HTML websites. You can adapt it and edit after the export into HTML.
...................................................
Sincerely,
Ahmad.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello, Thanks for contacting us As it was mentioned before and after, PHP code won't work in exported HTML websites. And in Nicepage for now no any plans to support PHP in exported HTML websites. You can adapt it and edit after the export into HTML. ................................................... Sincerely, Ahmad. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
v.piasta
31 Posts
v.piasta posted this 29 August 2022

Hello Ahmad,

thank you for your reply. I have found a way to make PHP work with HTML export although the Nicepage editor does not do it directly.
If your company is interested, I can provide a short description of the method. Hopefully, your developers can use it to improve Nicepage's function for future editions. The steps that I have used could easily be used to provide something similar as an incorporated feature. PHP is a great tool that should not miss in this platform.

If you guys don't mind, I could also publish it on the forum, given that the question has come up several times.
I just don't want to publish a workaround that you would rather not be public.

Hello Ahmad, thank you for your reply. I have found a way to make PHP work with HTML export although the Nicepage editor does not do it directly. If your company is interested, I can provide a short description of the method. Hopefully, your developers can use it to improve Nicepage's function for future editions. The steps that I have used could easily be used to provide something similar as an incorporated feature. PHP is a great tool that should not miss in this platform. If you guys don't mind, I could also publish it on the forum, given that the question has come up several times. I just don't want to publish a workaround that you would rather not be public.
Support Team posted this 29 August 2022

Hello Volker,

We would be appreciated if you could share the steps with the community and other uses who want to use PHP in their HTML websites. Feel free to share with others.

Thank you.
...................................................
Sincerely,
Ahmad.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello Volker, We would be appreciated if you could share the steps with the community and other uses who want to use PHP in their HTML websites. Feel free to share with others. Thank you. ................................................... Sincerely, Ahmad. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
info44392
61 Posts
info44392 posted this 29 August 2022

Yes, would be really interesting to see.

Yes, would be really interesting to see.
v.piasta
31 Posts
v.piasta posted this 29 August 2022

Ok, will do

Ok, will do
tmthyjntr
1 Posts
tmthyjntr posted this 30 August 2022

I will look forward to it

I will look forward to it
Support Team
Support Team posted this 30 August 2022

Hi,
Check the following ticket below
https://nicepage.com/questions/303772/how-to-create-a-php-page-for-a-multi-languge-site-with-nicepage-for-html
Thank you
...................................................
Sincerely,
Ahmad.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, Check the following ticket below https://nicepage.com/questions/303772/how-to-create-a-php-page-for-a-multi-languge-site-with-nicepage-for-html Thank you ................................................... Sincerely, Ahmad. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
jtlodi
18 Posts
jtlodi posted this 09 May 2023

Ok, will do

Hi Volker,

Was this work-around ever posted? I too, rely heavily on PHP and don't understand why NicePage doesn't simply drop in a
<form id method action> line.
I always have to 'back into it' once the exported HTML is done.

> Ok, will do > Hi Volker, Was this work-around ever posted? I too, rely heavily on PHP and don't understand why NicePage doesn't simply drop in a &lt;form id method action&gt; line. I always have to 'back into it' once the exported HTML is done.
jtlodi
18 Posts
jtlodi posted this 09 May 2023

My Bad .... I followed the link and there it was!
Sorry for wasting your time.

My Bad .... I followed the link and there it was! Sorry for wasting your time.
You must log in or register to leave comments