Create Database Without Using phpMyAdmin
Submitted by argie on Wednesday, December 5, 2012 - 10:11.
This tutorial will help you on how to create a database and a database table without opening phpmyadmin. The feature of this program is the user can add database and database table without using phpmyadmin.
to start this tutorial lets follow the steps bellow:
At this point we are now we can now create a database name without opening phpmyadmin. But we are not yet finish, our next step is to create a form and script that automatically create table in your database created.
That's it you've been successfully created the program that automatically create a database name and table without opening phpmyadmin. Hope this code will help those other php programmer.
Step 1: Creating The Database Name Form
To create a form, open your php editor and paste the code below and save it as "idex.php".- <form action="exec.php" method="post">
- database name:<input type="text" name="datname">
- <input type="submit" value="create">
- </form>
Step 2: Writing Our Script to Create Database name
Our next step is to write our script that automatically create a database. To do this paste the code bellow to your php editor and save it as "exec.php"- <?php
- if (!$con)
- {
- }
- $dddd=$_POST['datname'];
- {
- }
- else
- {
- }
- ?>
Step 3: Creating Our Database Table Form
To create a form, open php editor and paste the code below and save it as "createtableform.php".- Insert your query here:<br>
- <form action="savetable.php" method="post">
- <input type="hidden" name="datname" value="<?php echo $_GET['id']?>">
- <textarea name="asasasa" style="width: 500px; height: 500px;"></textarea><br>
- <input type="submit" value="create">
- </form>
Step 4: Writing Our Script that automatically create tables in your database
this step is we are going to write the script that will create table in your database. To do so, paste the code below in your php editor and save it as "savetable.php".- <?php
- if (!$con)
- {
- }
- // Create table
- $dddd=$_POST['datname'];
- $asasasa=$_POST['asasasa'];
- $sql = $asasasa;
- // Execute query
- ?>
Comments
Add new comment
- Add new comment
- 802 views