[svn r11631] bugfix: SQL error when editing a link

http://www.dokeos.com/forum/viewtopic.php?p=33820#33820
skala
Patrick Cool 19 years ago
parent 43adf186f3
commit f80db559d5
  1. 10
      main/link/linkfunctions.php

@ -228,7 +228,6 @@ function editlinkcategory($type)
global $title;
global $description;
global $category;
global $onhomepage;
global $selectcategory;
global $description;
global $category_title;
@ -255,6 +254,15 @@ function editlinkcategory($type)
// this is used to put the modified info of the link-form into the database
if ($_POST['submitLink'])
{
if ($_POST['onhomepage'] = '')
{
$onhomepage = 0;
}
else
{
$onhomepage = $_POST['onhomepage'];
}
// finding the old category_id
$sql = "SELECT * FROM ".$tbl_link." WHERE id='".$_POST['id']."'";
$result = api_sql_query($sql, __FILE__, __LINE__);

Loading…
Cancel
Save