View Single Post

  #15 (permalink)  
Old 07-06-08, 08:02
Flep Flep is offline
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,535
Rep Power: 6
Flep is on a distinguished road
Re: Simple GuestBook

Hi ricdev,
donwload the files and change getMessages.php with this code:
PHP Code:
<?php
    
/*
 *************************************
  Flash CS3 Simple Guestbook                            
  http://www.flepstudio.org     
  Author: Filippo Lughi          
  version 1.0                                
 *************************************
 */
    
include('configuration.php');
    
    
$mysql mysql_connect($dbhost,$dbuser,$dbpass);
    
mysql_select_db($dbname);
    
    
$Query="SELECT * from simple_guestbook";
    
$Result=mysql_query$Query );
    
$Return="<?xml version=".'"1.0"'." encoding=".'"UTF-8"?>'."\n"."<items>";
    
    while(
$item=mysql_fetch_object($Result))
    {
     
$Return.="<item><id>".$item->ID."</id><name>".$item->name."</name><message>"."<![CDATA[".$item->message."]]>"."</message><date>".$item->date."</date></item>"
    }
    
$Return.="</items>";
    
mysql_free_result($Result);
    echo (
$Return)
?>
All the rest is fine.
About the send button, I think there is a little bug at this forum board that sometime with some browers the button won't work.
Files are ok, use the guestbook and you'll see
__________________

 


I recommend: Essential Actionscript 3.0

- I do not reply technicians pvt messages. Open a thread !
- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
Reply With Quote