Flash formating of PHP data?

kept getting three errors in the script and when I asked about it on their forums the best they could come up with was “ignore them”.

Do you remember exactly what the problem was ?

Did it start and have errors ?
Not load the messages ?
Give error on sumbmitting ?

It loaded up the entries but then there were three errors that came up when you submitted each entry. Give me 5 mins I’ll set it up again and show you what I mean.

Here it is. Its fine now, but then you sign it… try for yourself.

No worries…
I have spent my whole weekend looking for an example of anything, even a shopping cart or something with tables… I will be looking for a couple more hours before I go to bed…

Maybe we will get lucky and sort out your errors.

I wish someone could sort them out :expressionless: Did you get anything like that when you installed it?

Notice: Undefined variable: i in c:\domains\vapour-music.co.uk\wwwroot ests\GuestBook.php on line 48

Notice: Undefined variable: i in c:\domains\vapour-music.co.uk\wwwroot ests\GuestBook.php on line 49

Notice: Undefined variable: i in c:\domains\vapour-music.co.uk\wwwroot ests\GuestBook.php on line 50

Notice: Undefined variable: i in c:\domains\vapour-music.co.uk\wwwroot ests\GuestBook.php on line 51
Name: The_Vulcan
Email: [email protected]
Comments: Testing
Date: 2004-07-18 16:24:24

Notice: Undefined variable: i in c:\domains\vapour-music.co.uk\wwwroot ests\GuestBook.php on line 54

Wow that is funny…

Have you changed anything in the files would be my first question ?

If you want .Zip and Post your .php file and .swf and I will upload it to my server and see if it works.

If it works it is a error on your server.
If it dont work there is a error in your files.

$DBhost = “localhost”; // Database Server
$DBuser = “"; // Database User
$DBpass = "
”; // Database Pass
$DBName = “***********”;// Database Name
$table = “guestbook”; // Database Table
$numComments = 10; // Number of Comments per page

Just change your info in the .php file before you send it.

Everything is straight out of the zip file, thats what I don’t get. I was told I might need to adjust table widths in MySQL or something but I don’t know squat about MySQL so… shrugs… give me two minutes and I’ll post the zip for you

Nah I didn’t have a problem at all…

The only thing I had to do was look up my database name…

Here is one that I was playing with…
I was experimenting/farting around with password protection so its not functional…

Just select Cathy from the drop down menu and hit submit.
http://www.cathyschultz.com/boylen/Girls%20of%20Boylen.html

Sweet, I was thinking of doing something like that because we kept getting a load of a-holes just spamming our old book. The zip file is attached.

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.