Creating a form for inserting data

Greetings! Dear Heshkodovtsy, I ask you to help me because I encountered PHP for the first time)

There is a table in MySQL:

create table stack (id SMALLINT NOT NULL AUTO_INCREMENT, ip CHAR(20) NOt NULL, type BOOLEAN NULL, PRIMARY KEY (id));

Please help me write a form for inserting data through the web interface in PHP.


Answer 1, authority 100%

INSERT INTO  `jevi`.`stack` (`id` ,`ip` ,`type`)VALUES (NULL ,  '12313123',  '0');

this is a database query

well, the form should have a text field and either checkbox or radiobox(2 values).


Answer 2

function checkbox_verify($_name)
{
$result=0;
if (isset($_REQUEST[$_name]))
{ if ($_REQUEST[$_name]=='on') { $result=1; } else { $result=0; }
}
return $result;
}