Hello
I try you code in this way:
<?php require_once('../../Connections/connect.php'); ?>
<?php
mysql_select_db($database_connect, $connect);
$query_rsInitials = "SELECT DISTINCT UPPER(LEFT(organisation,1)) FROM contacts ORDER BY organisation ASC";
$rsInitials = mysql_query($query_rsInitials, $connect) or die(mysql_error());
$row_rsInitials = mysql_fetch_assoc($rsInitials);
$totalRows_rsInitials = mysql_num_rows($rsInitials);
?>
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<?php
$alphabet=('A B C D E F G H I J K L M N O P Q R S T U V W X Y Z');
while ($r=mysql_fetch_array($rsInitials)) {
$initial=$r['organisation'];
$links=str_replace("$initial","<a href=\"$initial.php\">$initial</a>",$alphabet);
}
echo("$links");
?>
</body>
</html>
<?php
mysql_free_result($rsInitials);
?>
And I receive for every letter the error:
Any idea where I'm wrong?
Regards, Dom