Users Pricing

forum

Home Forums Connection in PHP – MindStick

Connection in PHP

Amit Singh 3009 18 Oct 2010

Connection in PHP we use this code:


<?php //Start PHP statement
 $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); //this is the MySql connection function with passing parameter
if (!$link) {  die('Could not connect: ' . mysql_error()); //this is show the connection error } echo 'Connected successfully'; //It show the message connection successfully or not mysql_close($link); //connection close here ?> //End PHP statement

0 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md