Page 1 of 1

mysql into html page

Posted: Wed Jun 10, 2020 4:48 pm
by afghanpoem
Hi,
I am kinda stuck with fetching data from mysql database into html file. The database could be displayed by running PHP (http://afghanpoem.com/display.php) with no issues. I have connection.php and display.php on the server, however running html file after published and running it from the server does not show the table, rather shows the entire codes as text. Since i am using template (master page for all my pages on the website, therefore i need to display the data on the html file (inside the template / master page).

- I also purchased Responsive Data Table Extension for WYSIWYG Web Builder, which i used the same credentials used in php files, filled the fields, but the result is the same, it shows the entire code, including username password etc as text.

I am i doing anything wrong?
is there any tutorial that for using Responsive Data Table Extension for WYSIWYG Web Builder and fetching data into HTML file.
Thanks

Re: mysql into html page

Posted: Wed Jun 10, 2020 5:10 pm
by Pablo
Did you set the page extension to PHP?

Re: mysql into html page

Posted: Wed Jun 10, 2020 5:31 pm
by afghanpoem
Thanks for the prompt reply.
no i have not changed it to PHP in the project. since WYSIWYG templates pages are all in html.
Thanks

Re: mysql into html page

Posted: Wed Jun 10, 2020 5:34 pm
by Pablo
You can set the page extension in the page properties.
PHP code will not work on a HTML page.

Re: mysql into html page

Posted: Wed Jun 10, 2020 5:50 pm
by afghanpoem
i changed the file extension to php , still the same shows as text.
i tried it with HTML extension, as well as with Responsive Data Table Extension for WYSIWYG Web Builder.
The results are the same, while i can run my other php files from the server they are ok http://afghanpoem.com/display.php

Re: mysql into html page

Posted: Wed Jun 10, 2020 6:20 pm
by Pablo
Where can I see the problematic page?

Note that the application does not change the code so if you have inserted it correctly then it should work.
But without seeing what you have done, there is nothing I can do to help.

Re: mysql into html page

Posted: Wed Jun 10, 2020 6:33 pm
by afghanpoem
In fact i deleted the file from the server and republished, just works now.
much appreciated for the assitance and your prompt replies.
thanks a lot