Php ajax

Status
Niet open voor verdere reacties.

parisdiesel

Gebruiker
Lid geworden
15 nov 2008
Berichten
94
Hoi,
Als ik in onderstaande html en ajax code, php code gebruik werkt het niet, wat doe ik verkeerd?
Alvast bedankt voor de reactie.


Code:
<?php
include("include/mysql.php");
?>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ImageFlow</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" href="style.css" type="text/css" />
 
<!-- This includes the ImageFlow CSS and JavaScript -->
<link rel="stylesheet" href="imageflow.packed.css" type="text/css" />
<script type="text/javascript" src="imageflow.packed.js"></script>
 
</head>
<body>
<h1>ImageFlow</h1>
 
<!-- This is all the XHTML ImageFlow needs -->
<div id="myImageFlow" class="imageflow">
<?php
$result = mysql_query('SELECT * FROM foto');
 
	while($row = mysql_fetch_array($result)){
?>
	<img src="<?php echo $row['afbeelding']; ?>" longdesc="<?php echo $row['afbeelding']; ?>" width="400" height="300" alt="<?php echo $row['afbeelding']; ?>" />
	
<?php
}
?>
</div>
 
</body>
</html>
 
Waar gebruik je AJAX dan? Dit is gewoon een php pagina.
 
Hoi Frats,

Onderstaande werkt wel, maar de afbeeldingen wil ik laten weer geven via mijn database zie bovenstaande bericht.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ImageFlow</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" href="style.css" type="text/css" />

<!-- This includes the ImageFlow CSS and JavaScript -->
<link rel="stylesheet" href="imageflow.packed.css" type="text/css" />
<script type="text/javascript" src="imageflow.packed.js"></script>

</head>
<body>
<h1>ImageFlow</h1>

<!-- This is all the XHTML ImageFlow needs -->
<div id="myImageFlow" class="imageflow">
	<img src="img/img1.gif" longdesc="img/img1.gif" width="400" height="300" alt="Image 1" />
	<img src="img/img2.png" longdesc="img/img2.png" width="300" height="400" alt="Image 2" />
	<img src="img/img3.png" longdesc="img/img3.png" width="400" height="400" alt="Image 3" />
	<img src="img/img1.png" longdesc="img/img1.png" width="400" height="300" alt="Image 4" />
	<img src="img/img2.png" longdesc="img/img2.png" width="300" height="400" alt="Image 5" />
	<img src="img/img1.png" longdesc="img/img1.png" width="400" height="300" alt="Image 6" />
	<img src="img/img2.png" longdesc="img/img2.png" width="300" height="400" alt="Image 7" />
	<img src="img/img3.png" longdesc="img/img3.png" width="400" height="400" alt="Image 8" />
	<img src="img/img1.png" longdesc="img/img1.png" width="400" height="300" alt="Image 9" />
	<img src="img/img1.png" longdesc="img/img1.png" width="400" height="300" alt="Image 10" />
	<img src="img/img2.png" longdesc="img/img2.png" width="300" height="400" alt="Image 11" />
	<img src="img/img3.png" longdesc="img/img3.png" width="400" height="400" alt="Image 12" />
	<img src="img/img2.png" longdesc="img/img2.png" width="300" height="400" alt="Image 13" />
	<img src="img/img3.png" longdesc="img/img3.png" width="400" height="400" alt="Image 14" />
	<img src="img/img3.png" longdesc="img/img3.png" width="400" height="400" alt="Image 15" />
</div>

</body>
</html>
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan