![]() |
|
#1
|
|||
|
|||
How to create a MYSQL Database with a HTML form?Hi,
How can i create a MYSQL Database through a HTML form? I searched and found one, but it didn't worked for me |
|||
|
#2
|
|||
|
|||
Re: How to create a MYSQL Database with a HTML form?Please help
|
|
#3
|
||||
|
||||
Re: How to create a MYSQL Database with a HTML form?The topic is not fully clear...
What do you mean 'create with HTML form'? HTML, alone, will NOT do it for you without some sort of back end connectivity. Can you provide some more specific details about what is trying to be done? EDIT: What is this 'other form' that you found that didn't work? __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#4
|
|||
|
|||
Re: How to create a MYSQL Database with a HTML form?I mean, when i submit a HTMl form with a text box where i typed in "lol", it creates a MYSQL database with the name i writed in the text also "lol"
EDIT: I didn't found it, but this is what i got: PHP Code:
Last edited by LuciWiz : 16-Jul-2008 at 01:37.
Reason: Please insert your Php code between [php] & [/php] tags
|
|
#5
|
||||
|
||||
Re: How to create a MYSQL Database with a HTML form?Ok, then assuming that the back end is available through the submit, that is a query:
Code:
[Note that having CREATE permission is assumed] EDIT: Ah, I see you basically have it in place. (I jumped to reply before your EDIT was added) Can you output what $make has after it fails, are you SURE the connection succeeded? __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#6
|
|||
|
|||
Re: How to create a MYSQL Database with a HTML form?When i go on the .php page it says this:
Code:
It says that it couldn't create a database, but i don't clicked on the Submit Button. It says it when i enter the page. And when i click on the Submit Button nothing happens, just the same is there. |
|
#7
|
||||
|
||||
Re: How to create a MYSQL Database with a HTML form?Try to add this inside the else [where make fails]
PHP Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#8
|
|||
|
|||
Re: How to create a MYSQL Database with a HTML form?Now it says this:
Error check: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 but line 1 is <?php |
|
#9
|
||||
|
||||
Re: How to create a MYSQL Database with a HTML form?That's not the line of reference, that is from MySQL.
How are you building the string? It's either complaining about misplaced quote(s), OR it's getting a blank text field when first opened. The easiest check for the second part would be to give the field a default value. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#10
|
||||
|
||||
Re: How to create a MYSQL Database with a HTML form?I see another small issue, you are passing $make to the query, but how does it know what the database name is supposed to be?
Slightly modified your code, try this example: PHP Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cpanel downgrade MYSQL 4.1.X to MySQL 4.0.xx | Webhosting-live | Web Hosting Forum | 1 | 01-Sep-2006 03:54 |
| HTML Form to PHP File - Help Requested | vigilantweather | MySQL / PHP Forum | 15 | 07-Aug-2006 20:22 |
| Help! Some basal questions about MFC | xutingnjupt | MS Visual C++ / MFC Forum | 1 | 05-Dec-2004 04:38 |
| [Tutorial] MySQL Basics | nniehoff | MySQL / PHP Forum | 15 | 23-Mar-2003 20:42 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The