joso
September 21, 2002, 2:30pm
1
hey again,
this time i need help with the following…
i have a guest book i created in flash and using php, but i kinda screwed up somewhere along the line and i dont know where, please help me someone…i’ve attached the files below
hope you can help thanks
system
September 21, 2002, 4:55pm
2
Exactly what is not working? Did you test it?
pom :asian:
system
September 21, 2002, 5:10pm
3
when you fill out the entry form and click submit, where your submission should appear, there is all little symbols like $*^% and stuff and all the other dynamic text boxes will up with symbols aswell.
system
September 21, 2002, 5:19pm
4
What should happen? And what’s the code that feeds the dynamic texts?
system
September 21, 2002, 5:29pm
5
your submission should appear in a scrollable text box, theres something wrong with the php file i think, or this code
NumLow = 0;
NumHigh = 10;
loadVariablesNum (“GuestBook.php?NumLow=”+NumLow+"&NumHigh="+NumHigh+"&R="+random(999), 0);
stop();
system
September 21, 2002, 6:41pm
6
Hi joso,
I take it you signed up then. Because you’re using PHP - or did was something else the problem, not your ISP?
Is there a link to your site so we can see how it runs (the guestbook)?
system
September 21, 2002, 7:21pm
7
Yeah, I meant the PHP code…
pom
system
September 21, 2002, 7:51pm
8
hey flex,
im working on a link, give me five…
pom the code is :
<?
$Name = ereg_replace("[^A-Za-z0-9 ]", “”, $Name);
$Email = ereg_replace("[^A-Za-z0-9 @.-/’]", “”, $Email);
$Comments = ereg_replace("[^A-Za-z0-9 @.-/’]", “”, $Comments);
$Website = eregi_replace("http://", "", $Website);
$Website = ereg_replace("[^A-Za-z0-9 \@\.\-\/\'\~\:]", "", $Website);
$Name = stripslashes($Name);
$Email = stripslashes($Email);
$Website = stripslashes($Website);
$Comments = stripslashes($Comments);
if ($Submit == “Yes”) {
$filename = “GuestBook.txt”;
$fp = fopen( $filename,"r");
$OldData = fread($fp, 80000);
fclose( $fp );
$Today = (date ("l dS of F Y ( h:i:s A )",time()));
$Input = "Name: <b>$Name</b><br>Email: <b><u><a href=\"mailto:$Email\">$Email</a></b></u><br>Website: <b><u><a href=\"http://$Website\" target=\"_blank\">$Website</a></b></u><br>Comments: <b>$Comments</b><br><i><font size=\"-1\">Date: $Today</font><br><br>.:::.";
$New = "$Input$OldData";
$fp = fopen( $filename,"w+");
fwrite($fp, $New, 80000);
fclose( $fp );
}
$filename = “GuestBook.txt”;
$fp = fopen( $filename,"r");
$Data = fread($fp, 80000);
fclose( $fp );
$DataArray = split (".:::.", $Data);
$NumEntries = count($DataArray) - 1;
print "&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh&GuestBook=";
for ($n = $NumLow; $n < $NumHigh; $n++) {
print $DataArray[$n];
if (!$DataArray[$n]) {
Print "<br><br><b>No More entries</b>";
exit;
}
}
?>