Welcome, Guest. Please login or register.
Did you miss your activation email?
05/23/12, 02:06
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)
| | |-+  Processing... Loading New....
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Processing... Loading New....  (Read 846 times)
arttransplant
Guest
« on: 03/23/04, 01:18 »

Hello,

I have just downloaded the guest book and followed the instructions. for some reason, i am getting "Processing...Loading New..." in the guestbook window after submitting the info from the fields. I've double and triple checked the permissions on the "GuestBook.txt" file so they are correctly set to 777.

I am running PHP Version 4.2.3 on my server. The folder "guestbook" resides on the top level of my domains directory. The flash movie is embedded into a standard dreamweaver file. Using Flash MX 2004, would it matter what version of Flash I saved the swf in? Do I need to set up a database or anything?

I am very new to PHP and not much of a coder, but I'm just trying to understand why it may not be working. What might I be doing wrong?


::::::::::::::::::::::  Here's the code  ::::::::::::::::::::::::::::

<?php
// If you are using an old version of php, remove the next set of lines.
// or use $HTTP_POST_VARS["..."] instead.
$Submit    = $_POST["Submit"];
$Name      = $_POST["Name"];
$Email      = $_POST["Email"];
$Website    = $_POST["Website"];
$Comments    = $_POST["Comments"];
$NumLow    = $_REQUEST["NumLow"];
$NumHigh    = $_REQUEST["NumHigh"];

// Replace special characters - you can remove the next 5 lines if wanted.
$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);

// Remove slashes.
$Name      = stripslashes($Name);
$Email      = stripslashes($Email);
$Website    = stripslashes($Website);
$Comments    = stripslashes($Comments);

// ###################################################################################
// ########## Reading and Writing the new data to the GuestBook Database #############

if ($Submit == "Yes") {
// Next line tells the script which Text file to open.
  $filename    = "GuestBook.txt";

// Opens up the file declared above for reading

  $fp      = fopen( $filename,"r");
  $OldData    = fread($fp, 80000);
  fclose( $fp );

// Gets the current Date of when the entry was submitted
  $Today      = (date ("l dS of F Y ( h:i:s A )",time()));

// Puts the recently added data into html format that can be read into the Flash Movie.
// You can change this up and add additional html formating to this area.  For a complete listing of all html tags
// you can use in flash - visit: www.macromedia.com/support/flash/ts/documents/htmltext.htm

  $Input = "Name: <b>$Name</b>
Email: <b><u><a href=\"mailto:$Email\">$Email</a></u></b>
Website: <b><u><a href=\"http://$Website\" target=\"_blank\">$Website</a></u></b>
Comments: <b>$Comments</b>
<i><font size=\"-1\">Date: $Today</font>

.:::.";

/* This Line adds the '&GuestBook=' part to the front of the data that is stored in the text file.  This is important because without this the Flash movie would not be able to assign the variable 'GuestBook' to the value that is located in this text file  */

  $New = "$Input$OldData";

// Opens and writes the file.

  $fp = fopen( $filename,"w");
  if(!$fp) die("&GuestBook=cannot write $filename ......&");
  fwrite($fp, $New, 800000);
  fclose( $fp );
}

// ###################################################################################
// ######### Formatting and Printing the Data from the Guestbook to the Flash Movie ##



// Next line tells the script which Text file to open.
  $filename = "GuestBook.txt";

// Opens up the file declared above for reading

  $fp    = fopen( $filename,"r");
  $Data    = fread($fp, 800000);
  fclose( $fp );

// Splits the Old data into an array anytime it finds the pattern .:::.
  $DataArray = split (".:::.", $Data);

// Counts the Number of entries in the GuestBook
  $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 "

<b>No More entries</b>";
      exit;
      }
  }
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #1 on: 03/24/04, 03:11 »

Hi Davidian,
did you read all the other threads about the guestbook?

There are several hurdles to take, but its nothing big Wink

What does your browser say, if you enter the php file directly into it?

Did you change anything on the flash script?

Could you give us the link to youre webspace, where this guestbook is running?
Logged

happy flashing
Cool
Ronald
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!