Can I add custom php code in my X5 Pro website?
Autor: Justin M.
Visitado 794,
Seguidores 1,
Compartilhado 0
Hi, can I use Website X5 Pro as my "design tool" to make my website look great, but then add deeply customized PHP coding inside the site to pull data from my MySQL database on the server, display data in tables, add custom form buttons, etc?
If so, any tips on how to approach this?
Publicado em
You can put your code in an html-object and then change the page to a PHP type.
You change the page type in settings or the page.
On this page : https://mogenshansen49.dk/det-gamle-testamente.html
you can see an example.
The upper part of the page is a selection on one type.
The lower part is a table showing entries for that type.
Data is coming from a MySQL databae where the client himself can maintain the texts for the type and also the texts for every lecture.
There is made a php-script that connects to the database. This script is included in another script that reads data from the databse and then shows them in a table.
This script is shown in the X5-page via an iframe.
Same site but another example : https://mogenshansen49.dk/foredrag.html
Here is shown all lectures.
The database is made via the databse tool AppGini. This tool has some built-in features as sorting, search and select. It also has the possibility to specify for each table who is allowed to create, edit and delete records. This is the way the client can maintain the data by himself.
The example shows a view from the app made via AppGini. The view is shown in an iframe in the X5 page.
Here is an example on a testsite : http://eksempelsite.dk/side-4.html
If you click in the bottom
you will be able to click on the "Map" fields and the "Virklink" fields to see more information for the records.
In this example is made a customized selection possibility for the page.
*** The first example : https://mogenshansen49.dk/det-gamle-testamente.html requires no special database tool.
It is always possible to make a php script to connect to the databse and then a script that includes tis script and displays data in a table. Then put this second script into an iframe in a X5 page via a html-object.
Hello Justin,
Like John says, WebSite X5 will accept PHP code. In fact, there are so many different places to insert the code that it is a developer's dream.
You can put code in the following locations:
But that's not all... WebSite X5 will also permit you to place PHP code inside many of the various Objects included in the software, in addition to regular HTML.
Kind regards,
Paul
Search the WebSite X5 Help Center