HTML Code:
<form name="form1" method="post" action="test.php?do=save">
Should be:
HTML Code:
<form name="form1" method="post" action="test.php">
<input type="hidden" name="do" value="save" />
Change:
PHP Code:
if ($_REQUEST['do'] == 'save')
{
$vbulletin->db->query_write("INSERT INTO `Links` (`id`, `Name`, `url`, `description`) VALUES ('10', '$name', '$url', '$description');");
}
To:
PHP Code:
if ($_REQUEST['do'] == 'save')
{
$vbulletin->input->clean_array_gpc('p', array(
'name' => TYPE_STR,
'url' => TYPE_STR,
'description' => TYPE_STR
));
$vbulletin->db->query_write("INSERT INTO `Links` (`id`, `Name`, `url`, `description`)
VALUES ('10'
, '" . $vbulletin->db->escape_string($vbulletin->GPC['name']) . "'
, '" . $vbulletin->db->escape_string($vbulletin->GPC['url']) . "'
, '" . $vbulletin->db->escape_string($vbulletin->GPC['description']) . "'
);");
}