Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
HELP in using radio button and mysql
Old 09-10-2007, 11:08 PM HELP in using radio button and mysql
Skilled Talker

Posts: 65
Trades: 0
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, title, and pubdate, (along with a radio
button) 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
leolim is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-10-2007, 11:13 PM Re: HELP in using radio button and mysql
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
for the first part
http://www.php-mysql-tutorial.com/php-mysql-select.php
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 09-10-2007, 11:28 PM Re: HELP in using radio button and mysql
Skilled Talker

Posts: 65
Trades: 0
but i still blur with it could you give a more specific example?
thanks
leolim is offline
Reply With Quote
View Public Profile
 
Old 09-11-2007, 03:56 PM Re: HELP in using radio button and mysql
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
using that one you can list all the rows from a mysql table into a html table .
after you have done that ... you can go forward and make the second part ... the delete one...

one step at a time,

plus this a place to learn and not to get full scripts for you're aplications
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 09-12-2007, 05:14 AM Re: HELP in using radio button and mysql
Super Talker

Posts: 134
Trades: 0
something like this


PHP Code:
<?
mysql_connect
("host","username","password");
mysql_select_db("dbname");
if (isset(
$_POST["delete"])) {
    
mysql_query ("delete from atable where idnum = ".$_POST["idnum"]);
    
} else {
$res=mysql_query("SELECT * FROM atable");
echo 
"<form method='post' action='".$_SERVER['PHP_SELF']."'>";
while (
$rec=mysql_fetch_array($res)) {
 echo 
"<input type='radio' name = 'idnum' value='".$rec["idnum"]."'> ".$rec["idnum"]." ".$rec["name"]." ".$rec["address"].$rec["date"]."<br />";    
}
echo 
"<input type = 'submit' name='delete' value='delete'>";
echo 
"</form>";

}
mysql_close();       
?>
__________________

Please login or register to view this content. Registration is FREE

Check out the Facebook Clone build with Jcow SNS at
Please login or register to view this content. Registration is FREE
, it is free and it always will be
Falcone is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to HELP in using radio button and mysql
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.92098 seconds with 12 queries