Jump to content

CheckBox Function


balkan7

Recommended Posts

hello i have this code:

[code]function NewCheck($new) {

  $new = "<input type='checkbox' name='new' value='New'>";
  $new2 = "<img src='images/new.gif' width='35' height='15'>";
  if($_POST["new"] == "New") {
  echo $ew2;
} else {
echo "";
}
return $new;
}[/code]
mysql: [code]`New` varchar(25) NOT NULL default '',[/code]

code:
[code]$newinfo = $_POST[CheckNew];
        $New3 = $newinfo[0];
          <tr>
<td align=right>New ?:</td>
<td><?=NewCheck($New3);?></td>
</tr>

$q1 = "insert into bb_catalog set
New = '$New3',[/code]

so i this code not working, need help also for insert picture in mysql when is checkbox checked, if not checked nothing for insert !
Link to comment
https://forums.phpfreaks.com/topic/29174-checkbox-function/#findComment-134015
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.