473,386 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Manipulating database records using a checkbox

hi..

I am new in PHP.. I am programming for my graduation project..

how can I bind check box to table in html form, so when check on any record, I can do any operation I want, such as update, delete, etc.

I am using PHP with Oracle DB..
Thank u, and I hope a quick reply..

My regards

IT Student
May 19 '07 #1
2 1799
rug
6
hi..

I am new in PHP.. I am programming for my graduation project..

how can I bind check box to table in html form, so when check on any record, I can do any operation I want, such as update, delete, etc.

I am using PHP with Oracle DB..
Thank u, and I hope a quick reply..

My regards

IT Student
Hello,

You can do this using:
Expand|Select|Wrap|Line Numbers
  1. <input type="checkbox" name="mycheckbox" value="records-unique-id">
If you want to make the check box be checked by default do:
Expand|Select|Wrap|Line Numbers
  1. <input type="checkbox" name="mycheckbox" value="records-unique-id" checked>
.

When generating the table use a loop to add the check boxes and use the value (which should contain your records unique ID) to apply whatever processing you require.

Hope this helps,
rug

p.s: Helping with homework is a bad thing. :( So next time, in order for you to learn yourself, try researching (via google) and then if you hit a problem, consult the forums).
May 19 '07 #2
Atli
5,058 Expert 4TB
p.s: Helping with homework is a bad thing. :( So next time, in order for you to learn yourself, try researching (via google) and then if you hit a problem, consult the forums).
This is true, altough, helping people with homework is ok, as long as we are explaining how to write the code rather that writing it for them. So your responce was pretty good.

Thread titles, however, should descripe the topic of the thread. "PHP help" is not a good title, as it explains nothing and will return nothing if our fellow members are searching for a similar problem. It is also more likely that the thread will catch the eyes of our Experts if they are propperly named.
Which is why I have edited the title of this thread.

These rules, aswell as our complete list of rules, can be found in our Posting Guidelines, which every member should read through attleast once.

MODERATOR
May 20 '07 #3

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

Similar topics

8
by: Sans Spam | last post by:
Greetings! I have a table that contains all of the function permissions within a given application. These functions are different sections of a site and each has its own permissions (READ, WRITE,...
3
by: TrvlOrm | last post by:
I am having great difficulty in these asp scripts, using VBscript and JavaScript. I have 4 files that all need to be linked together. The first file "Books.html" - needs to search for a Book...
3
by: Eddie Biscomb | last post by:
I have a db of tens of thousands of entries. It's not too hard to pull all the entries and build a table that displays them one at a time, but in my case, that will be a huge waste of space. What...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
0
by: sukaina | last post by:
hello i want to update some records in the database by using checkboxes. I wrote a code but it didn't work proparly. It update whole records not only the selected one by the checkbox. how can i...
14
by: David | last post by:
Hi, I have a form on which a user can select a checkbox against a record. Each checkbox carries the RecordID of a product. ---------------------------------------------------------------- I...
9
greensleeves
by: greensleeves | last post by:
Hi, Im a newbie to PHP and I'm wondering if someone could help me out with this Tryng to search out products from a database by clicking a checkbox option for instance if description contains...
7
by: mukeshrasm | last post by:
hello everyone I want to delete the selected records from database using checkbox. whch is generated dyanamically and checkbox is also generated dynamically,using php. so please help me. if you...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.