Jump to content

Search the Community

Showing results for tags 'wont load'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi! I'm an 85 year old newbie, trying to implement a "store bought" Guestbook. I seem to be having a problem with the module that connects the DB to the .flv (I think!) I've checked it with several online checkers and they don't report any errors/ Would someone be so kind as to look at the code and see id you can find the errors? THANKS! <?php // CONNECT TO THE SERVER AND SELECT DATABASE $server = "ftp.ipage.com"; $user = "jimmybryantnet"; $password = "********"; $dataBase = "guestbook"; $conx = mysql_connect($server,$user,$password); $db_selected = mysql_select_db($dataBase,$conx); if($conx && $db_selected){ // IF CONNECTION IS ESTABLISHED $xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; $xml .= "<data>\n"; if(isset($_POST['name'])){ $result = 0; $name=mysql_escape_string(trim($_POST['name'])); $email=mysql_escape_string(trim($_POST['email'])); $message=mysql_escape_string(trim($_POST['message'])); // ADD DATA TO THE TABLE guestbook WHEN THE USER PRESS THE send_btn in FLASH $sql="INSERT INTO guestbook(name,email,message,dateAdded)values('$name','$email','$message',now())"; $query = mysql_query($sql,$conx); if ($query){ $result= 1; $sql2 = "SELECT * FROM guestbook ORDER BY id DESC"; $query2 = mysql_query($sql2,$conx); //WHEN query == true , GET LIST OF MESSAGES AND PUT THEM AS XML FILE while($data = mysql_fetch_array($query2)){ $xml .= "<guest>\n"; $xml .= "<name>".$data['name']."</name>\n"; $xml .= "<msg><![CDATA[".$data['message']."]]></msg>\n"; $xml .= "<sdate>".$data['dateAdded']."</sdate>\n"; $xml .= "</guest>\n"; } } else{ $result=0; } $xml .= "<inserted>".$result."</inserted>\n"; } if(isset($_POST['getMessage'])){ // GET LIST OF MESSAGES AND PUT THEM AS XML FILE $sql = "SELECT * FROM guestbook ORDER BY id DESC"; $query = mysql_query($sql,$conx); while($data = mysql_fetch_array($query)){ $xml .= "<guest>\n"; $xml .= "<name>".$data['name']."</name>\n"; $xml .= "<msg><![CDATA[".$data['message']."]]></msg>\n"; $xml .= "<sdate>".$data['dateAdded']."</sdate>\n"; $xml .= "</guest>\n"; } } $xml .= "</data>\n"; echo $xml; } else{ // IF CONNECTION == false OR DATABASE DOESN'T EXISTE die (mysql_error()); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.