Flash formating of PHP data?

http://www.cathyschultz.com/fiery/gbv2.swf

didn’t put it in a html so give it a sec…

It worked fine so it is not your files…

CREATE TABLE guestbook (
ID int(5) NOT NULL auto_increment,
name text NOT NULL,
email text NOT NULL,
comments text NOT NULL,
time datetime NOT NULL default ‘0000-00-00 00:00:00’,
PRIMARY KEY (ID)
)

I would delete your table and remake it just to be sure there are no errors in that.

Is your mysql on the same server as your php and .swf
I know there are errors when you try to connect to mysql on a different server.

I will look at the line errors you posted above…

The MySQL and the files are all on the same server :expressionless: I think I’m maybe not creating the table right. Did you set column widths or something in MySQLCC? Someone told me something about that…

if($numallComments == 0) {
print “No entries in the guestbook, as yet…”;
} else {
while ($array = mysql_fetch_array($fewComments)) {
$name = mysql_result($fewComments, $i, ‘name’);
$email = mysql_result($fewComments, $i, ‘email’);
$comments = mysql_result($fewComments, $i, ‘comments’);
$time = mysql_result($fewComments, $i, ‘time’);

		   print '<b>Name: </b>' . $name . '<br><b>Email: </b>' . $email . '<br><b>Comments: </b>' . $comments . '<br><i>Date: ' . $time . '</i><br><br>';
		   $i++;
	    }
	}

well its obviouslt the $i var that is causing the problem so they question is why?

If it was java you would have to give it a value before you use it… But PHP i dont know about… perhaps your server is running a older version of PHP that needs its var declared before they are used.

It is running version 4.3.3. I know its not the newest but its fairly up to date… I dun o I really don’t know squat about php :frowning:

The only thing I can think of is declare the var $i = 0; before the

if($numallComments == 0) {

I just recreated the MySQL table… I’m still getting the same errors :expressionless:

I used php admin and pasted the code into the query window and that was it…

The only thing I can think of is declare the var $i = 0; before the

if($numallComments == 0) {

So what exactly would I change the code to? Just so i don’t mess this up and waste yet more time…

phpMyAdmin 2.5.3

**MySQL 3.23.58 **

I dont know what PHP version they are using or where to find it…
all they say is PHP4+

Since your line errors are the ones with [color=#ff0000]$i [/color][color=black]and it says it is a undefind var I would give it a value before it is used… [/color][color=#0000ff]$i = 0;[/color]

[color=blue]$i = 0;[/color]
if($numallComments == 0) {
print “No entries in the guestbook, as yet…”;
} else {
while ($array = mysql_fetch_array($fewComments)) {
$name = mysql_result($fewComments, [color=red]$i[/color], ‘name’);
$email = mysql_result($fewComments, [color=red]$i[/color], ‘email’);
$comments = mysql_result($fewComments, [color=red]$i[/color], ‘comments’);
$time = mysql_result($fewComments, [color=red]$i[/color], ‘time’);
print ‘<b>Name: </b>’ . $name . ‘<br><b>Email: </b>’ . $email . ‘<br><b>Comments: </b>’ . $comments . '<br><i>Date: ’ . $time . ‘</i><br><br>’;
[color=red]$i[/color]++;
}
}

I just had a quick look at var stuff and it says you dont have to declare the type.

Adding that code you give on the last page worked! You have no idea how happy you have just made me :smiley: runs in circles

stops running in circles Ps, Thank-you! continues to run in circles

No prob… but I still say there is no God :to:

:D:D:D

You might wanna use this, you might not want to…

The [color=red]red[/color] is HTML code that is on your page, the [color=blue]blue[/color] is the new stuff and where it should be placed.
(it will put the guest book bang smack in the centre of the page instead of left top)

The green [color=lime]700[/color] / [color=lime]500[/color] will make it a little bigger so it fills more of the page.
:smiley:
[color=red]**

[/color]
[color=red]
<body>[/color]
[color=red]
[color=blue]<TABLE WIDTH=“100%” HEIGHT=“100%” BORDER=“0”><TR align=“center” valign=“middle”><TD>
[/color]<object classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0” width=“[color=lime]700[/color]” height=“[color=lime]500[/color]”>
<param name=“movie” value=“gbv2.swf”>
<param name=“quality” value=“high”>
<embed src=“gbv2.swf” quality=“high” pluginspage=“http://www.macromedia.com/go/getflashplayer” type=“application/x-shockwave-flash” width=“[color=lime]700[/color]” height=“[color=lime]500[/color]”></embed>
</object>[/color]
[color=red][color=blue]
</TD></TR></TABLE>[/color]
</body>
</html>
[/color]
[color=red]

**[/color]

ahhhhh… shweet, yeah thanx I think I’ll need that for the whole way through my site because there will be a pop up window and everything is going to be in flash but before I was getting big bits of… non flashness… so that helps :slight_smile: never thought of doing it like that… thanx :slight_smile:

And I’m too happy that I can actually get part of the site working to care if theres a God or not :stuck_out_tongue:

Well its 2:37am

So I am outta here… catch ya later…

c ya… cheers for all the help :slight_smile: