Shoutbox: here i am again

AHHH DAMMIT!! I had the entire response typed out and then, like a moron I closed the window. Oh well here we go again. It works on my machine. I am going to attach the files.

http://www.livetoskateboard.com/test/FTsb/shoutbox0r.swf

Flash File:


//------- Frame 1
loadVariablesNum("viewtext.php", 0, "GET");
gotoAndPlay(3);

//------- Frame 2
dataLoader = new LoadVars();
stop();


//------- Frame 3
loadVariablesNum("viewtext.php", 0, "GET");
stop();

//------- "Kick It!" Button
on (release) {
	_root.dataLoader.nName = _root.nName;
	_root.dataLoader.nEmail = _root.nEmail;
	_root.dataLoader.nMess = _root.nMess;
	_root.dataLoader.send("shout.php", _root.dataLoader, "POST");
	gotoAndPlay(3);
}




Shout.php:


<?
//-----------------------------
//FileName: shout.php
//-----------------------------
$nName = $_POST['nName'];
$nEmail = $_POST['nEmail'];
$nMess = $_POST['nMess'];

$nName = ereg_replace("&", "and", $nName);
$nEmail = ereg_replace("&", "and", $nEmail);
$nMess = ereg_replace("&", "and", $nMess);

$nName = stripslashes($nName);
$nEmail = stripslashes($nEmail);
$nMess = stripslashes($nMess);

$filename = "shout.txt";
$fp = fopen( $filename,"r"); 
$OldData = fread($fp, 80000); 
fclose($fp); 
	
$Input = "$nName<br>$nMess<br><u>Website: $nEmail</u><br><br>";

$New = "$Input$OldData";
	
$fp = fopen( $filename,"w"); 
fwrite($fp, $New);
fclose($fp); 

echo "<script language=\"JavaScript\">
"; 
echo "self.close()"; 
echo "</script>"; 

?>

viewtext.php:


<?
//---------------------------------
//FileName: viewtext.php
//----------------------------------
$filename = "shout.txt";
$fp = fopen($filename,"r");
$savedtext = fread($fp, 80000); 
fclose($fp);

print "text=$savedtext";

?>

Now if this doesn’t work then try to use the unique Identifier like LostInBeta ( :flower: ) originally suggested and it should work just fine.

Cheers,
Jubs :crazy:

hm, the prob is, that when i sign it, a new browser window opens. iexplorer asks me if i allow this site to close the window. i changed your php script to prevent that new window… thanks man , but any idea how to solve that without opening a new window?

Nope. I can’t change it. I can’t make the script work without the window opening…

Don’t know if this will work or not. I’m not at my computer anymore. Try changing the code on the “kick it” button. Change where it says “POST” to “GET” I doubt this will work tho. You could try to post on www.tutorialforums.com and ask hem. They have some really smart people over there…

Sorry man…

another problem: when i load a movie which loads vars from a php-script into a mc, why doesnt that work? i mean, ive tried it, and the variables arent loaded.