PHPBuilder - Storing Data in the Client Page 3



RSS Twitter
Articles Tricks And Hacks

Storing Data in the Client - Page 3

by: PHP Builder Staff
|
July 30, 2000

PHP & JavaScript World Domination Series: Storing data in the client.

Action!

Please create a test database with mysql (mysqladmin create testbase) and then create a table with:

create table testeable (
  timestamp datetime,
  message	text
);

This is the "master" file:

<script>
lines=new Array();
function displaymsgs() {
  for(i=0;i<lines.length;i++) {
	 display.document.write(lines[i]);
	 display.document.write('<BR>');
  }
}
</script>
<frameset cols="1" rows="20,60,20" border="0">
<frame name="loader" src="loader.php">
<frame name="display" src="display.php">
<frame name="form" src="form.php">
</frameset>

Note that we have the loader frame, the display frame and a new frame called "form", this is the form we use to send messages to the chat room. Note the simple "display" function, you can use whatever you want here, colors, dynamic colors, user preferences, html tables, images, etc etc.

The display frame is:

<script>
top.displaymsgs();
</script>

We promised it will be short :-)


« Previous Page
1
|
2
|
3
|
4
|
5
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:

Comment:



Comment:

(Maximum characters: 1200). You have characters left.