Jump to content

can i connect to access database using html code???


eng.mohamed_elqpany

Recommended Posts

depends what the database is...its usually a MySQL database, in which case you need php.Do you know any server side scripting at all? Whats the database for?And i suggest not using frontpage for web design. Most people here use notepad or dreamweaver.

Link to comment
Share on other sites

<?php$con = mysql_connect("localhost","peter","abc123");if (!$con)  {  die('Could not connect: ' . mysql_error());  }mysql_select_db("my_db", $con);$result = mysql_query("SELECT * FROM person");while($row = mysql_fetch_array($result))  {  echo $row['FirstName'] . " " . $row['LastName'];  echo "<br />";  }mysql_close($con);?>

Link to comment
Share on other sites

what @www.mihalism.com just gave is for MySQL databases.For Access in PHP, see the ODBC page. It descibes what you need to do in Access and what in PHP.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...