I use floatbox with static content, and it works fine.
But I don't know how to use variables in the floatbox.
I want to display users photos. And on mouseover a floatbox opens with infomations.
For static information, it's OK.
But I want is to display in the floatbox some informations (name, age, weight,...) about the user.
All this information is in a SQL DB and I can extract this info to PHP variables.
But I don't know how to put these PHP variables in the floatbox content.
Thanks for help.
Using PHP variables
Page: 1
Author | Post |
---|---|
#1 Tue Oct 16, 2012 10:02 pm
|
|
Member
Registered: Oct 2012
Posts: 19
|
|
#2 Wed Oct 17, 2012 12:06 am
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
Perhaps you want to bring in your content as type:ajax? The href target of the ajax fetch would be a server-side page that assembles the desired html content based on DB information. Client-side javascript does not have access to back-end databases. Only server-side code can talk to a server-side DB.
|
#3 Wed Oct 17, 2012 11:59 am
|
|
Member
Registered: Oct 2012
Posts: 19
|
Yes, it works with AJAX.
But the problem is that I must have an external file and initialize the framework. Thanks. |
#4 Tue Oct 23, 2012 10:37 am
|
|
Member
Registered: Aug 2012
Posts: 26
|
Simply write your PHP such that it creates the page source you need. PHP is executed on the server and creates a document, which is then sent to the client just like a static HTML page. Floatbox is executed on the client. It doesn't care whether the content is static or was created dynamically. |
Page: 1