Im having some problems getting this to work:
then some html code here ... followed by the script where my problem is:PHP Code:<?php
error_reporting (0);
// Connects to your Database
mysql_connect("localhost", "root", "") or die(mysql_error()) ;
mysql_select_db("travelinit") or die(mysql_error()) ;
//Select Query for images from db
$query="SELECT id, fld_imagename FROM tbl_banner";
$result = mysql_query($query) or die(mysql_error());
//Loop to get image names from query
while($row = mysql_fetch_array( $result ))
{
//Write image path and names on page - NAMES ARE PULLED FROM DB
echo "".$row['fld_imagename']. ","; ?> </br>
<?php } ?>
PHP Code:<script language="JavaScript1.1">
<!--
//*****************************************
// Blending Image Slide Show Script-
// © Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************
//specify interval between slide (in mili seconds)
var slidespeed=3000
//specify images
var slideimages=new Array(<?php NEED TO HAVE THE MYSQL ARRAY DATA HERE ?>);
var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}
function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}
//-->
</script>
need the above line of code code to pull from MYSQL where it says "NEED TO HAVE THE MYSQL ARRAY DATA HERE"
the original line of code looks like this:
PHP Code:var slideimages=new Array("topbanner/1.jpg","topbanner/2.jpg","topbanner/3.jpg")
Seen this line of code by: jscheuer1 of DD
have tried doing this but nothing works..PHP Code:fadeimages[0]=[".<?php echo $row_Recordset1['photo1']; ?> ", "", ""]
please help im no good at javascript yet and want to learnPHP Code:slideimages[0]=[".<?php echo $row['fld_imagename']; ?> ", "", ""]
thank you
Mike



Reply With Quote

Bookmarks