leolim Posted September 11, 2007 Share Posted September 11, 2007 hi, this is the beginning of my php lesson and i might need some guide here I have created a simple MySQL database, with fields; $idnum $name $address $date I'd like to be able to show idnum, name, and address, and date (along with a radio button in front of each record) for all record in the database into a table. The user will select a radio button for appropriate peom, then simply hit a 'delete' button, which of course will delete it from the database. currently i am having a hard time with what I need to DO them. Anyone who can help? So, can anyone point me to any tutorials/scripts/tips/etc that might help? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/68780-help-in-radio-button-and-mysql-please/ Share on other sites More sharing options...
hackerkts Posted September 11, 2007 Share Posted September 11, 2007 Put a value in the radio button in html code, then validate it using PHP. This link might help, http://www.homeandlearn.co.uk/php/php4p10.html Quote Link to comment https://forums.phpfreaks.com/topic/68780-help-in-radio-button-and-mysql-please/#findComment-345744 Share on other sites More sharing options...
pocobueno1388 Posted September 11, 2007 Share Posted September 11, 2007 If this is your first lesson, you are going at a rate thats way too fast. You should build yourself up to being able to do this, that way when you get to this lesson, you will be able to do it without a problem. Here is what you will need to learn: -Retrieving/deleting information from the database with MySQL -Looping through the rows with a while loop -Working with forms and PHP -Using $_POST data, which goes along with forms. At least try to attempt it the best you can, then post the code you end up with. Before even doing that, I would suggest learning the very basics of PHP. Quote Link to comment https://forums.phpfreaks.com/topic/68780-help-in-radio-button-and-mysql-please/#findComment-345749 Share on other sites More sharing options...
bre Posted September 11, 2007 Share Posted September 11, 2007 I've been trying to figure out how to do that as well. Problem with example is that it is only good for one instance. I want to be able to loop through for each record on database. Also, I'd like to know how to find which ones were selected. Quote Link to comment https://forums.phpfreaks.com/topic/68780-help-in-radio-button-and-mysql-please/#findComment-345753 Share on other sites More sharing options...
pocobueno1388 Posted September 11, 2007 Share Posted September 11, 2007 Well, here are some tutorials to start reading: Working with Forms http://www.onlamp.com/pub/a/php/2003/03/13/php_foundations.html http://www.tizag.com/phpT/forms.php www.tizag.com has a lot of good tutorials, you might want to just start going from lesson to lesson on that site. Retrieving information from the DB http://www.redhat.com/magazine/010aug05/features/mysql/ http://www.php-mysql-tutorial.com/php-mysql-select.php Looping through rows in the DB (while loop) http://www.tizag.com/phpT/whileloop.php Quote Link to comment https://forums.phpfreaks.com/topic/68780-help-in-radio-button-and-mysql-please/#findComment-345759 Share on other sites More sharing options...
bre Posted September 11, 2007 Share Posted September 11, 2007 Thanks very much for the links. Quote Link to comment https://forums.phpfreaks.com/topic/68780-help-in-radio-button-and-mysql-please/#findComment-345761 Share on other sites More sharing options...
leolim Posted September 12, 2007 Author Share Posted September 12, 2007 hi everyone thanks for the pages guideline i wil go and visit those sites once again thanks Quote Link to comment https://forums.phpfreaks.com/topic/68780-help-in-radio-button-and-mysql-please/#findComment-346519 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.