By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,406 Members | 2,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,406 IT Pros & Developers. It's quick & easy.

Manipulating database records using a checkbox

P: 1
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
Share this Question
Share on Google+
2 Replies


P: 6
rug
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
Expert 5K+
P: 5,058
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

Post your reply

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