Reputation: 9
CODE am trying:
what about update radio button's logic ?? Is this OK ??
if(isset($_POST['btnSubmit']))
{
$book_save = $_POST['book_title'];
$author_save = $_POST['author_name'];
$gender_save = $_POST['gender'];
mysql_query("UPDATE bookss SET book_title ='$book_save',author_name ='$author_save',gender='$gender_save' WHERE ID = '$id'")
or die(mysql_error());
i refer 2 links in SO but m not getting properly with radio button .... Suggestions are always Welcome ...
Upvotes: 0
Views: 1250
Reputation:
I agree with everyone above, are you hard coding the radio button values? if so, I'm not sure how SQL injection would effect radio button entries. In any case, if you're stuck to this structure I'd at least do something like this:
$book_save = mysql_real_escape_string($_POST['book_title']);
Upvotes: 1