Jump to content

creating database


abhi201090

Recommended Posts

Please tell me what is wrong with this code and how to correct it?

i am not able to create database with this code

 

<?php

mysql_connect('localhost','root','password');

$name="xyz";

$create="CREATE DATABASE '$name'";

mysql_query($create) or die(mysql_error());

mysql_close();

?>

 

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/205346-creating-database/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.