Hi, im new to both php and mySQL.
I know nothing about access, I don't even have it.
anyhow, I have made a guestbook wich works perfectly with php/mySQL, only to discover that my cheap as* "web host" doesn't include mySQL as a service, only access, so now I have to convert my newly created guestbook from mySQL to access...
as you probarly can gues, a search like "access + mySQL" doesn't bring anything good
C.
I would also like a direction about where I could get an overview over the syntax that access use? or is it odbc syntax😕
Il bring the entire code below:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language= "javascript">
function MM_openBrwindow(theurl,winname,features) {
window.open(theurl,winname,features);}
</script>
<link rel="StyleSheet" href="../main.css" type="text/css" media="screen">
<title>gæstebog</title>
<?php
//<!--
// Opret forbindelse til mySQL databasen
// og vælger gaestebog som den aktive database
//-->
$dbcnx = @mysql_connect("localhost", "root", "SeCrEtT");
if (!$dbcnx) {
echo( "<p>Der kunne ikke oprettes forbindelse til databasen " .
"en fejl repport er sendt til administratoren ! .</p>" );
exit();
}
mysql_select_db("gaestebog",$dbcnx);
?>
</head>
<body>
<h1><center>Gæstebog</center></h1>
<center><br>
<a href ='#' OnClick="window.open('../html/skrivigaeste.html','skriv','toolbar=no,location=no,status=no,menubar=no,scroolbars=no,resizable=no,width=250,height=180');">
skriv i gæstebogen</a></center>
<?php
$antalPoster = @("select count(ID) from gaestebog");
$antalPoster = mysql_fetch_array($antalPoster);
$antalPoster = $antalPoster['count(ID)'];
for ($taeller = $antalPoster; $taeller >= 1; $taeller--) {
$aktivraekke = @("select * from gaestebog where ID = $taeller");
$raekke = mysql_fetch_array($aktivraekke);
echo("<p><center>" .
"<table width = '400' cellpadding = '0' cellspacing = '0' border = '1' >" .
"<tr><td><table bgcolor=#9966FF width = '400' cellpadding = '0' cellspacing = '0'>" .
"<tr><td width = '100'><center><b>" . $raekke['Navn'] . "</b></center></td><td width = '200'></td>" .
"<td width = '100'>" . $raekke['Dato'] . "</td></tr></table>" .
"<table bgcolor=#3333CC width = '400' cellpadding = '0' cellspacing = '0'>" .
"<tr><td><center><font color = 'FFFFFF'>" . $raekke['Tekst'] . "</font></center></tr></td></table></table></p>");
}
?>
</body>
</html>