Welcome, Guest. Please login or register.
Did you miss your activation email?
05/21/12, 04:31
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Recent Tutorial Support
| |-+  Flash GuestBook Support (Moderators: Flash-db, vesa kortelainen, Ronald Wernecke, Mohsin Sumar, Jorge Solis)
| | |-+  problem with tutorial
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: problem with tutorial  (Read 1776 times)
igor
Server what's that
*
Posts: 2



View Profile Email
« on: 02/14/02, 19:40 »

 Huh
hi everybody!
i have problem at first script in tutorial

NumLow = 0;
NumHigh = 100;
loadVariablesNum ("\"GuestBook.php?NumLow=\"+NumLow+\"&NumHigh=\"+NumHigh+\"&R=\"+random(999)", 0);
stop ();

i have error!!!
i don`t know what i`m doing, and then i don`t know where i can write script
<?
1)      $Name = ereg_replace("[^A-Za-z0-9 ]", "", $Name);
2)      $Email = ereg_replace("[^A-Za-z0-9 \@\.\-\/\']", "", $Email);
3)      $Comments = ereg_replace("[^A-Za-z0-9 \@\.\-\/\']", "", $Comments);

4)      $Website = eregi_replace("http://", "", $Website);
5)      $Website = ereg_replace("[^A-Za-z0-9 \@\.\-\/\'\~]", "", $Website);

6)      $Name = stripslashes($Name);
7)      $Email = stripslashes($Email);
Cool      $Website = stripslashes($Website);
9)      $Comments = stripslashes($Comments);

10)      if ($Submit == "Yes") {
11)         $filename = "GuestBook.txt";
12)         $fp = fopen( $filename,"r");
13)         $OldData = fread($fp, 80000);
14)         fclose( $fp );
15)         $Today = (date ("l dS of F Y ( h:i:s A )",time()));
   
16)         $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>.:::.";

17)         $New = "$Input$OldData";
   
18)         $fp = fopen( $filename,"w");
19)         fwrite($fp, $New, 80000);
20)         fclose( $fp );
21)      }
22)      $filename = "GuestBook.txt";
23)      $fp = fopen( $filename,"r");
24)      $Data = fread($fp, 80000);
25)      fclose( $fp );
   
26)      $DataArray = split (".:::.", $Data);
27)      $NumEntries = count($DataArray) - 1;
28)      print "&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh&Guest Book=";
29)      for ($n = $NumLow; $n < $NumHigh; $n++) {
30)      print $DataArray[$n];
31)         if (!$DataArray[$n]) {
32)         Print "<br><br><b>No More entries</b>";
33)         exit;
34)         }
35)      }
   ?>

HuhHuhHuhHuhHuhHuhHuhHuhHuhHuhHuhHuhHuhHuhHuhHuhHuhHuh
i really don`t know!!
PLZ HELP!!!
THANX!!!
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #1 on: 02/17/02, 14:19 »

First of all the loadVariables command in the Flash Movie should look like this:

NumLow = 0;
NumHigh = 10;
loadVariablesNum ("GuestBook.php?NumLow="+NumLow+"&NumHigh="+NumHigh+"&R="+random(999), 0);
stop();

You should not put the back slashes in here as you don't want to comment out any of these quotes.  

Second,

Use the Script from the Download File - and not the one from the Tutorial Text.  The Numbers are from the tutorial and are only included to explain each line.  The real script does not use these Numbers and will cause all kinds of problems if your try to use that one.

Download the complete files here:
http://www.flash-db.com/GuestBookTut/GuestBookTutorial.zip

Then use GuestBook.php - as the script and not the one your showed on the post.  
Logged

-Jeff.
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!