473,382 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Sliding menu of images

18
Hi to all
I can make a presentation of fixed images easily in Flash.
I want to ask if its possible to do it dynamically from a database?
Regards
F
Nov 18 '09 #1
5 2018
dlite922
1,584 Expert 1GB
You can either have action script access the database or have PHP get it from the database and give it to your flash application.



Dan
Nov 18 '09 #2
phobia1
18
I'll get digging into reading.
Best
F
Nov 19 '09 #3
phobia1
18
Hi Guys
I have this piece of code that is supposed to produce XML from data retrieved from database Garant. Could anyon tell me why it has stopped working? Its bound to be syntax again but I would appreciate a second pair of eyes to look at it.
Regards FJW

Expand|Select|Wrap|Line Numbers
  1. <?PHP
  2. // slider.php
  3. require("./resources/globals.php") ;
  4. // Generate the SQL command for doing a select from the Database
  5. $query = "SELECT smallpic,Ref,Pic1 FROM Garant LIMIT 10";
  6.  
  7. // Connect to the Database
  8. $link=mysql_connect($location,$userName,$passwor d) or die (mysql_error());
  9. mysql_select_db($dbname) or die (mysql_error());
  10. $results=mysql_query($query) or die (mysql_error());
  11.  
  12. // Select the Database
  13. if (!mysql_select_db($dbname, $link)) {
  14.  DisplayErrMsg(sprintf("Error in selecting %s database", $dbname)) ;
  15.  DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link), mysql_error($link))) ;
  16.  exit() ;
  17. }
  18. // Execute the Statement
  19. if (!($results =mysql_query($query, $link))) {
  20.  DisplayErrMsg(sprintf("Error in executing %s stmt", $query)) ;
  21.  DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link), mysql_error($link))) ;
  22.  exit() ;
  23. }
  24. // Display the results of the query
  25. //header("Content-type: text/xml");
  26. $linkID = mysql_connect($localhost, $userName, $password) or die("Could not connect to host.");
  27. mysql_select_db($dbname, $linkID) or die("Could not find database.");
  28.  
  29. $resultID = mysql_query($query, $linkID) or die("Data not found.");
  30. $xml_output = "<?xml version=\"1.0\"?>\n";
  31. $xml_output .= "<images>\n";
  32. for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
  33.  $row = mysql_fetch_assoc($resultID);
  34.  $xml_output .= "<image src=\"images/tn/";
  35.  $xml_output .= "".$row['smallpic']."";
  36.  $xml_output .= "\" title=\"\" url=\"images/";
  37.  $xml_output .= "".$row['Pic1']."";
  38.  $xml_output .=" \">\n";
  39. }
  40.  $xml_output .= "</images>";
  41. echo $xml_output;
  42. ?> 
Nov 23 '09 #4
phobia1
18
Expand|Select|Wrap|Line Numbers
  1. echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
  2.  $xml_output .= "<images>\n";
  3.  for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
  4.  $row = mysql_fetch_assoc($resultID);
  5.  $xml_output .= "<image src=\"images/tn/";
  6.  $xml_output .= "".$row['smallpic']."";
  7.  $xml_output .= "\" title=\"\" url=\"images/";
  8.  $xml_output .= "".$row['Pic1']."";
  9.  $xml_output .=" \" />\n";
  10. }
  11. $xml_output .= "</images>";
  12. echo $xml_output;
  13.  ?> 
Nov 23 '09 #5
phobia1
18
thread closed as I got it all working fully automatically
Nov 23 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
4
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
1
by: Guadala Harry | last post by:
AFAIK, when placing an object into the Cache with no special instructions (no dependencies, sliding expirations, hard expirations, etc), it will just sit there in the Cache until the system decides...
3
by: Alberto La Pera | last post by:
Hi! I'd like to realize a Custom Web Control for a sliding menu, but i really don't know how to control the client-side "animation" of the menu. Can anyone help me? Thank you a lot in advance......
1
by: Viktor | last post by:
Hello, I started to rewrite the lightbox code for a different layout. The main advantage would be to have a sliding image bar, but I can not get the sliding motion. The html code: <div...
3
by: wsharad | last post by:
Hi, I have got a requirement. In my application, i have a JSP which includes an Applet. On top of that i have a Menu option, on click of which a sliding menu comes up. The problem is, the menu...
1
by: CKich30 | last post by:
When viewing my page (siuehockey.net) in Firefox, it's setup how I want it to look. When i viewed it using IE, the menu at the top runs into the "Cougar Hockey/cougarhockey.net" at the top left....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.