Problem with AS and PHP

I’m using AS and PHP in a guestbook, and it doesn’t seem to be working. I’ve tried everything I can think of.
Here is the PHP code


<?php
if(!file_exists("guestbook.txt")){
	print "entries=0";
	exit();
}else{
	$wholeFile = file_get_contents("guestbook.txt");
	print ("entries=".$wholeFile);
}
?>

basically, as you can see, this just takes data out of a text file and prints it.

the data is written to the textfile separated by |(denotes a new entry) and #(denotes a username), for example
‘This site is really cool!#njs12345|It is, isn’t it!#kirupa

this is the AS I am using:

[AS]
scroll_txt = textScroller_mc.scroll_txt;
guestbookLoad_lv = new LoadVars();
guestbookLoad_lv.load(“guestBookRead.php”);
guestbookLoad_lv.onLoad = function(success) {
if (success) {
textLoaded = guestbookLoad_lv.entries;
if (textLoaded=“0”) {
scroll_txt.htmlText = “Sorry, there are no entries in the guestbook at this time.”;
} else {
if (textLoaded.indexOf("|" == -1)) {
textLoaded.split("&");
scroll_txt.htmlText += “<br>”;
scroll_txt.htmlText += textLoaded[1];
scroll_txt.htmlText += “<br>”;
scroll_txt.htmlText += “posted by “+”’”+textLoaded[2]+"’.";
} else {
textloaded.split("|");
for (var i = 0; i<textLoaded.length; i++) {
textLoaded*.split("#");
}
for (var i = 0; i<textLoaded.length; i++) {
scroll_txt.htmlText += “<br>”;
//just some scroller code
scroll_txt.htmlText += textLoaded*[1];
scroll_txt.htmlText += “<br>”;
scroll_txt.htmlText += “posted by “+”’”+textLoaded*[2]+"’.";
}
}
}
} else {
scroll_txt.htmlText = “Sorry, an error has been encountered.”;
}
};
stop();
with (textScroller_mc) {
scrollUp_btn.onRelease = function() {
if (scroll_txt.scroll>1) {
scroll_txt.scroll–;
}
};
scrollDown_btn.onRelease = function() {
if (scroll_txt.scroll<scroll_txt.maxscroll) {
scroll_txt.scroll++;
}
};
}
submit_btn.onRelease = function() {
gotoAndStop(“frame2”);
};
[/AS]

try to change this line:
[AS]
if (textLoaded.indexOf("|" == -1)) {
[/AS]
to:
[AS]
if (textLoaded.indexOf("|") == -1) {
[/AS]

e.s.x.s

Yeah- I made loads of errors, but I fixed it now.