473,549 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

create new mysql table by html checkbox value with php code

1 New Member
I am new in PHP & MYSQL. I have a multiple checkbox item in html form and want to create a new table by this checked item in an existing database with PHP code .
May 17 '10 #1
1 2366
chathura86
227 New Member
you can build a sql query to create the table and execute it using mysql_query()

http://sql-info.de/mysql/examples/CR...-examples.html
check the link for instruction of creating tales in mysql

can you post your code (what you have done so far) here so i can see and help you further.

keep i mind that creating tables dynamically is not a good practice
unless you are using it for a installer or something.

Regards

Regards
May 17 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
4616
by: Jack | last post by:
Hi, I have a checkbox the value which goes to a database via a asp page that builds the sql string. In the front end asp page, the checkbox code is written as follows: <i><input type="checkbox" name="chk_Complete" value="<%Response.Write l_IsChecked%>"<%if cbool(l_IsChecked) then Response.Write " checked"%>> The code to captures the...
2
2429
by: trank | last post by:
I created some checkboxes(<input type=checkbox>) dynamically,and then I'd like to access these checkboxes in code behind using C#. For they are not standard controls like Windows Checkbox, I can't catch it by FindControl().....how can i do this? Many thanks a lot! By trank trank@dynamic-x.net
9
12535
by: Craig Andrews | last post by:
Hello, How do I access HTML CheckBoxs in the codebehind section of an ASP.NET program? In the old Interdev days one would: For i = 1 to Request.Form("CheckBox").Count if Request.Form("CheckBox")(i)) > 0 then End If Next
9
2784
by: Dejan | last post by:
Hy, Sorry for my terreble english I have this simple code for deleting rows in mysql table... Everything works fine with it. So, what do i wanna do...: my sql table looks something like this: id Name Surname pictr0 picrt1 pictr2 pictr3
5
1464
by: carllucas | last post by:
I am green to mysql and php. I've got issues trying to create a table in my database mysql_connect($hostname, $username, $password); mysql_select_db($database) or die("Unable to select database"); $query="CREATE TABLE news (id int(6) NOT NULL,name varchar(15) NOT NULL, age int(2) NOT NULL,email varchar(20) NOT NULL)"; ...
14
6075
by: mistral | last post by:
Need php script to create mySQL database programmatically; since hosting configuration may not allow create database from script, script also need eliminate/rewrite all restrictions in appropriate places in that hosting.
2
2422
by: lakuma | last post by:
Hi, I have a table called A (say) with columns called name, place, animal and thing. I would want to write an on insert trigger on this table, which would create a table with the name of the value entered in the name column. Let's say a new column is entered with the value of name column as mickey. I want to create a table called mickey,...
1
3015
by: TechnoAtif | last post by:
Hi to all. I have got a form containing of checkboxes along with other items. I have simply no clue as to (i) how to make entry for those checkbox data into the mysql table . I mean : what query to put for creating field corresponding to checkboxes. Create table arc(status ---?) status is the array for checkboxes. what should be the data type...
2
2132
by: servo | last post by:
I am using the following code. Why it does not insert record in the MySQL Table through php script: <?php $dbhost='localhost'; $dbuser='root'; $dbpass='newpass'; $mysqldb='mysql'; if(isset($_POST)){
23
1576
by: MikeB | last post by:
I'm learning PHP and MySQL. In the samples I work with, the SQL table names are "escaped" in accent grave (`) marks, not in single or double quotes. Can anyone explain that? For instance, I have the following: $sql_command = "SELECT * from `7-1_List`";
0
7464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7734
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7826
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6065
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5107
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3512
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1960
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1074
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
781
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.