473,388 Members | 1,340 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

PHP within shtml?

Not sure if this is even possible...

I have a website with a PHP-based message board. The message board
has a donation tracker plug in that manages donation goals and current
donation amounts. At the top of my message board there is a
dynamically updated donation total. It uses this code to display the
information:

Amount We Need To "Keep It Free": $ {$this->ipsclass-
>cache['donate_cache']['total_goals']}<br>
<br>
Amount Donated To Date: $ {$this->ipsclass->cache['donate_cache']
['total_donations']}

I'd like to also add this dynamically generated tally to my main
site's SHTML page. Is there a way to add PHP, using Javascript or
whatever, so that the tally grabs what it needs from the database?

Thanks!
Jun 2 '08 #1
2 1775
On 28 Apr, 15:35, jmpatric...@gmail.com wrote:
Not sure if this is even possible...

I have a website with a PHP-based message board. The message board
has a donation tracker plug in that manages donation goals and current
donation amounts. At the top of my message board there is a
dynamically updated donation total. It uses this code to display the
information:

Amount We Need To &quot;Keep It Free&quot;: $ {$this->ipsclass->cache['donate_cache']['total_goals']}<br>

<br>
Amount Donated To Date: $ {$this->ipsclass->cache['donate_cache']
['total_donations']}

I'd like to also add this dynamically generated tally to my main
site's SHTML page. Is there a way to add PHP, using Javascript or
whatever, so that the tally grabs what it needs from the database?

Thanks!
XHR?
Jun 2 '08 #2
NC
On Apr 28, 8:35 am, jmpatric...@gmail.com wrote:
>
I have a website with a PHP-based message board. The message board
has a donation tracker plug in that manages donation goals and current
donation amounts. At the top of my message board there is a
dynamically updated donation total. It uses this code to display the
information:

Amount We Need To &quot;Keep It Free&quot;: $ {$this->ipsclass->cache['donate_cache']['total_goals']}<br>

<br>
Amount Donated To Date: $ {$this->ipsclass->cache['donate_cache']
['total_donations']}

I'd like to also add this dynamically generated tally to my main
site's SHTML page. Is there a way to add PHP, using Javascript or
whatever, so that the tally grabs what it needs from the database?
Doing it the way you want (i.e., combining SSI and PHP
in a single file) is impossible (SSI and PHP are handled by
different server modules, so you can't combine SSI and PHP
code and expect the server to execute both).

What you can do is create a simple PHP script that only shows
"Amount Needed" and "Amount Donated" and show its output in an
iframe on the main (or any other) page.

A slight modification of this approach is to create an AJAX-type
widget that would request the PHP script and display its output
in a predefined location on the home page.

Cheers,
NC
Jun 2 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike K. | last post by:
When I renamed my files with an shtml extension the design option disappeared and the html code lost its color- coding. Does anyone know how to setup the environment so that it treats .shtml file...
24
by: Stavros Christoforou | last post by:
Hello everyone, I was wondering if someone could help me with an issue I have in C++. I want to select random points within the volume of a sphere. I know how to get random numbers using srand()...
10
by: EnjoyNews | last post by:
I have a php site I have an include line called "include 'Cookie.php';" In this Cookie.php file I have these codes. <?php $conn = mysql_connect("$db", "$user", "$pass");...
21
by: Doug Thews | last post by:
I was noticing that when I run a multi-threaded app from within the IDE and then I close the main form (which spun off all of the threads), that the Stop/Pause VCR buttons in the debugger are still...
2
by: Kenneth Baltrinic | last post by:
I am working on a static web site that uses server side includes. Thus the files have the .shtml extention. The IDE does not recoginzis this extention as being html and uses the generic text...
5
by: Daniel Walzenbach | last post by:
Hi, I need to know how I could populate a word file from within ASP.NET and stream it out to some user (I can rely on all users have at least Word XP installed). The preferable solution would be...
5
by: Frank | last post by:
The following code will not work in my shtml page at all and I can not figure out the reason. I get the error that there is a "Type Mismatch 'Launch'" when i click the button. If i change the...
1
kestrel
by: kestrel | last post by:
what is shtml? u made a shtml file, and it displays just like a regular html or htm file is there any difference?
2
by: KerryL | last post by:
How do I update the value of a databound column within my datagrid from within the SelectedIndexChanged event of a dropdownlist, also found within my datagrid? I believe I need to determine the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.