No onurdyh it's not working
  The reason why i wrote  "mysql_connect("localhost","mysql","mysql"); "
  is that the username and password that we gave for MySql(while doing instance 
configuration of MySql (right after installing  it)) is 'mysql' and 'mysql' .
  I tried  "mysql_connect("localhost","root");"
  but it's not working.
  plz help.
   
  ONE MORE QUESTION
  after installing php and MySql do we need to do some thing for db connection
  like in DNS connection?
Coz all i did is install php and mysql and nxt thing i did was write down the 
foll code
  Hv  i missed something?
   
  
onurdyh <[EMAIL PROTECTED]> wrote:
          use this:
mysql_connect("localhost", "root");

pratimadongare <[EMAIL PROTECTED]> wrote: I tried this code to create a table 
in MySql 
saved it as "Emptable"
tried loading it on browser
got the following error

php fatal error.Call to undefined function mysql_connect() in 
C:\Inetpub.wwwroot\sakec

(Note- other simple pages in php r working fine and i can create a 
table(same query) in MySql using cmd prompt)

The Code:
<?php
mysql_connect("localhost","mysql","mysql") or die(mysql_error());
mysql_select_db("sakec") or die(mysql_error());
mysql_query("CREATE TABLE employee(empid VARCHAR(10) PRIMARY KEY, 
libid VARCHAR(10),empname VARCHAR(30), division VARCHAR(10), 
designation VARCHAR(20), emailid VARCHAR(30), password VARCHAR(15), 
date_time TIMESTAMP)") or die(mysql_error());
echo("table created");
?>

plz help





DyhOnur..

---------------------------------
Never miss a thing. Make Yahoo your homepage.

[Non-text portions of this message have been removed]



                         

       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.

[Non-text portions of this message have been removed]

Reply via email to