RE: [PHP-DB] Dynamic Website Question!
| From: | Bronislav Klucka | Date: | Sun, 30 Nov 2003 10:33:38 +0000 |
| Subject: | RE: [PHP-DB] Dynamic Website Question! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171394@lists.php.net to get a copy of this message | ||
>
> Okay I see how that works. However I have a heap of
> mysql queries to do and only want the output from the
> database to show.
>
> > ele.innerHTML="<?=date("Y-m-d H:i:s");?>";
>
> So is the section I need to change?
>
> Now I have 2 options, I can include the code in that
> file but it appears it don't like spaces and enters
> and outputs an error and wont do anything or I could
> add a require function to get it from another
> filename?
>
> How can I do it?
>
> The queries are about 25 lines long with varies
> queries. How can I make it work with the code you
> sent me?
>
> The code works fine on it's own so it works. :)
>
> Jerry
>
Hi,
This is only sample how to change content od this element, where you get
data is your problem:
1/
<?php
$data='';
for ($i=1;$i<1000;$i++) $data.=$i;
?>
.
.
.
ele.innerHTML="<?=$i?>";
.
.
.
2/
$res=mysql_query("select crap from table'');
$row=mysql_fetch_array($res);
.
.
.
ele.innerHTML="<?=$row["crap"]?>";
.
.
3/
if ($fd=fOpen('file.ext","r")){
$var=fread ($fd, filesize ($filename));
fClose($fd);
}
.
.
.
.
ele.innerHTML="<?=$var?>";
.
.
clear?
Brona