This is a discussion on "CREATE DATABASE name' from config.php" within the PHP Forum section. This forum, and the thread "CREATE DATABASE name' from config.php are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
CREATE DATABASE name' from config.php
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
||||
|
||||
|
CREATE DATABASE name' from config.php
i am having a little problem, i want to define the CREATE DATABASE 'name' inside the config.php, - i am going to build an install an hopefully have a form to be filled out to create all the config.php stuff after submission
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Jan 19th, 2008 at 19:57. |
|
|
|
#2
|
|||
|
|||
|
Re: CREATE DATABASE name' from config.php
Replace this
|
|
#3
|
||||
|
||||
|
Re: CREATE DATABASE name' from config.php
thats what i did, but the database created a database literly called $dbname, or is the dot important ?
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
|
|
#4
|
||||
|
||||
|
Re: CREATE DATABASE name' from config.php
hold on, i think this is the problem now
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Sep 21st, 2007 at 17:30. |
|
#5
|
||||
|
||||
|
Re: CREATE DATABASE name' from config.php
uh try
$db = "CREATE DATABASE '$dbname'";
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#6
|
|||
|
|||
|
Re: CREATE DATABASE name' from config.php
No ... you need the . to tack on a variable
The code I posted above should work
|
|
#7
|
||||
|
||||
|
Re: CREATE DATABASE name' from config.php
database created i just cant select it now
tryed
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Sep 21st, 2007 at 17:30. |
|
#8
|
||||
|
||||
|
Re: CREATE DATABASE name' from config.php
dont think you need a . here:
('.$dbname') try ('$dbname')
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#9
|
|||
|
|||
|
Re: CREATE DATABASE name' from config.php
No .... the . is to attach a multiple variables together or to text... like
hth |
|
#10
|
||||
|
||||
|
Re: CREATE DATABASE name' from config.php
done
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
|
|
#11
|
|||
|
|||
|
Re: CREATE DATABASE name' from config.php
No problem!
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] php re-writing variables in config from form | Emzi | PHP Forum | 2 | Jan 22nd, 2008 07:58 |
| [SOLVED] writing a config file | saltedm8 | PHP Forum | 2 | Oct 13th, 2007 18:31 |
| can create database but not tables | saltedm8 | Databases | 28 | Sep 16th, 2007 19:31 |
| config.xml | klimi73 | Other Programming Languages | 0 | Nov 13th, 2005 06:30 |
| newbie simple create database to record web page input | jfb130 | Databases | 3 | Aug 28th, 2005 16:37 |