sql - Interact with webmatrix database using PHP -


i having trouble using webmatrix database. insert data database registration page written in php.

when created database "web.config" file created. how can use connectionstring "web.config" file in php able connect database?

connection string web.config file:

     <connectionstrings>     <add connectionstring="server=localhost;uid=root;database=sitedetest;pwd=123" name="sitedetest" providername="mysql.data.mysqlclient" /> </connectionstrings> 

i tried this:

config.php

       <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = '123'; $dbname = 'sitedetest'; ?> 

in registration page:

include 'config.php';     $conn = mysql_connect($dbhost,$dbuser,$dbpass)         or die ('error connecting mysql');     mysql_select_db($dbname); 

but when try using registration form, 'error connecting mysql' message

thank time


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -