hello everyone, please help me, i have a website running on internet , now i want to add a registration form in my website , here i want all the information the visiter filled in form would be stored in Mysql database, But there is a problem how to make connection please provide me code for making connection With my sqldatabase over internet using PHP.
query about php
Collapse
X
-
-
Hi,hello everyone, please help me, i have a website running on internet , now i want to add a registration form in my website , here i want all the information the visiter filled in form would be stored in Mysql database, But there is a problem how to make connection please provide me code for making connection With my sqldatabase over internet using PHP.
you can do it this way..
Code:<?php $server = "localhost"; //your machine $user = "root"; //default $password = ""; //no password by default $db = "myDatabase" //the name of the database set in [url]http://localhost/phpMyAdmin[/url] $link = mysql_connect($server,$user,$password); mysql_select_db($db, $link) or die("Cannot Access Database"); // you are now connected to your MySQL Database ?>
Comment