PHP forums, MySQL forums, Web Development resources

Home PageHome    PHP ResourcesTopic List    FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups 
 RegisterRegister
    ProfileProfile    Log in to check your private messagesLog in to check your private messages    Download the RSS Reader RSS Feed Download the RSS Reader RSS for this forum Log inLog in 

PHP Forum :: MySQL Forum :: Java Script Forum



PHP & access

 
Post new topic   Reply to topic    WeberForums.com Forum Index -> Why Use PHP
View previous topic :: View next topic  
Author Message
denis
Guest





PostPosted: Thu Mar 18, 2004 12:14 am    Post subject: PHP & access Reply with quote

how do i use php and access database for a website,where can i seekl info bout it.sample code etc
Back to top
lostboy



Joined: 02 May 2004
Posts: 6033
Location: toronto, canada

PostPosted: Mon May 03, 2004 9:28 pm    Post subject: Reply with quote

have you worked this out yet? The basics are ODBC and setting a dsn for the access db...
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
ddwebguru



Joined: 16 Jul 2008
Posts: 195
Location: India

PostPosted: Mon Sep 29, 2008 8:45 am    Post subject: Reply with quote

You have to define the path for your database from administrative tool of your computer,then you will be able to link.
Back to top
View user's profile Send private message
nilapsa



Joined: 16 Feb 2010
Posts: 1

PostPosted: Tue Feb 16, 2010 6:11 am    Post subject: Very useful thing to know Reply with quote

The php is most often used to create dynamic websites ans projects include forums or communities organizers, project management tools, calendars, shopping carts, mailing lists, and all sorts of useful applications. And the php is server side scripting language such as ASP and JSP. Thank you for sharing this useful information with us.
Back to top
View user's profile Send private message
lahmanwokard



Joined: 15 Feb 2010
Posts: 4
Location: london

PostPosted: Wed Feb 17, 2010 8:25 am    Post subject: Reply with quote

Hello denis
An ODBC simple Example to access Database to your website
The following example shows how to first create a database connection, then a result-set, and then display the data in an HTML table.

Connecting to an ODBC
The odbc_exec() function is used to execute an SQL statement.
Example
$conn=odbc_connect('northwind','','');
$sql="SELECT * FROM customers";
$rs=odbc_exec($conn,$sql);

<html>
<body><?php
$conn=odbc_connect('northwind','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$sql="SELECT * FROM customers";
$rs=odbc_exec($conn,$sql);
if (!$rs)
{exit("Error in SQL");}
echo "<table><tr>";
echo "<th>Companyname</th>";
echo "<th>Contactname</th></tr>";
while (odbc_fetch_row($rs))
{
$compname=odbc_result($rs,"CompanyName");
$conname=odbc_result($rs,"ContactName");
echo "<tr><td>$compname</td>";
echo "<td>$conname</td></tr>";
}
odbc_close($conn);
echo "</table>";
?></body>
</html>
Hope it will useful for you.
Back to top
View user's profile Send private message Send e-mail
StephenHarry



Joined: 17 May 2010
Posts: 2

PostPosted: Mon May 17, 2010 1:12 pm    Post subject: Reply with quote

Thanks for sharing the code by which we can learn the database connectivity.
Back to top
View user's profile Send private message Visit poster's website
vipin kumar



Joined: 05 Apr 2010
Posts: 26

PostPosted: Tue May 25, 2010 8:18 am    Post subject: Reply with quote

can we use php easily?
Back to top
View user's profile Send private message
lostboy



Joined: 02 May 2004
Posts: 6033
Location: toronto, canada

PostPosted: Fri May 28, 2010 2:05 pm    Post subject: Reply with quote

Yes
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Paul Daniel



Joined: 12 May 2010
Posts: 63

PostPosted: Mon May 31, 2010 9:24 am    Post subject: Reply with quote

Hi
Refer this link

http://www.astahost.com/info.php/Connecting-Ms-Access-Php-Odbc_t12828.html
Back to top
View user's profile Send private message
Display posts from previous:   
WeberTrivia Questions WeberTrivia Questions
 Think you are smart? Prove it!. Try your skills with these questions :
 WeberTrivia QuestionsRecursive arrays and multi-dimensional arrays are one and the same. (PHP and MySQL)
 WeberTrivia QuestionsThe \"cache_dir\" tag of the squid configuration has a default of /var/spool/squid. (Linux)

WeberTrivia Questions



PHP Code Examples
 Stream diffrent sizes of images from a single image to save disk space.
 JavaScript dropdown list menu to switch any page.
 Dump the contents of a PHP variable in html format with a recursive list of subfolders and files from a given root directory.
 PHP Dump in html format the contents of one array variable with a recursive list of the nested array variables inside.
 Link Extractor - This function is used to extract links from a given URL. This will convert relative path into absolute path and also remove PHPSESSID stuff.
 Building a Dynamic Form using Javascript and innerHTML. Add form elements in realtime without refreshing the page.
 A PHP Calendar function with CSS : add a cool calendar to any php page by just adding a calendar class based function.
Post new topic   Reply to topic    WeberForums.com Forum Index -> Why Use PHP All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
PHP Forum :: MySQL Forum :: Java Script Forum