ktsixit
02-25-2010, 11:13 AM
Hi all,
I'm using a form to update the INT value of a sql table field called "frontpage". i use the following code
$updateSQL = sprintf("UPDATE trips SET frontpage=%s WHERE id=%s",
GetSQLValueString($_POST['frontpage'], "int"),
GetSQLValueString($_POST['id'], "int"));
mysql_select_db($database_seasons_con, $seasons_con);
$Result1 = mysql_query($updateSQL, $seasons_con) or die(mysql_error());
<label><input type="radio" name="fronpage" value="1" id="fronpage_0" />Yes</label>
<label><input type="radio" name="fronpage" value="0" id="fronpage_1" />No</label>
The problem is that the "frontpage" value is always passed as "null" in database which means that the radio button value can't be accessed properly. What am I doing wrong here? Can you help me?
I'm using a form to update the INT value of a sql table field called "frontpage". i use the following code
$updateSQL = sprintf("UPDATE trips SET frontpage=%s WHERE id=%s",
GetSQLValueString($_POST['frontpage'], "int"),
GetSQLValueString($_POST['id'], "int"));
mysql_select_db($database_seasons_con, $seasons_con);
$Result1 = mysql_query($updateSQL, $seasons_con) or die(mysql_error());
<label><input type="radio" name="fronpage" value="1" id="fronpage_0" />Yes</label>
<label><input type="radio" name="fronpage" value="0" id="fronpage_1" />No</label>
The problem is that the "frontpage" value is always passed as "null" in database which means that the radio button value can't be accessed properly. What am I doing wrong here? Can you help me?