Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to Create DB connection in HTML Pages

Posted on 2013-11-07
5
132 Views
Last Modified: 2013-12-18
Hi, Expert

I Need to develop website in HTML , give me your suggestions that which script we can use for SQL Server Database connection.
0
Comment
Question by:Asrar Azmi
  • 2
5 Comments
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 500 total points
ID: 39630232
You need a server-side script to connect, such as PHP or ASP
0
 
LVL 43

Expert Comment

by:Chris Stanyon
ID: 39630270
I don't know ASP, but in PHP, a connection string will look something like this (this is for MySQL):

$dbh = new PDO('mysql:host=localhost;dbname=database', 'username', 'password');

Open in new window


The connection to your database is now accessible through the $dbh variable, and you can use that to perform all the CRUD operations (Create, Retrieve, Update, Delete)
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 39630329
there are countless languages out there that will connect to a database, it all depends on the scope your project and what technologies you're comfortable with.

classic asp and PHP are excellent scripting languages, while .NET provides more of an object oriented approach.

If you can give us more info, such as technologies you're familiar with or the direction you want to take your professional career in (assuming this is related), then we may be able to give you more specific answers.
0
 
LVL 43

Expert Comment

by:Rob
ID: 39726010
I've requested that this question be closed as follows:

Accepted answer: 250 points for ChrisStanyon's comment #a39630232
Assisted answer: 250 points for The_Big_Daddy's comment #a39630329

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question