Solved

How to Create DB connection in HTML Pages

Posted on 2013-11-07
5
124 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 42

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 42

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 32

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 42

Expert Comment

by:Rob Jurd, EE MVE
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Make bootstrap pagination vertical 3 40
javascript to html map 8 38
Detecting robots? 5 34
C3-->D3 Line Chart 4 17
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now