1
kerkyra
submit pressed once-data inserted 3 times!
  • 2008/7/26 18:06

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


hallo there,
i'm having a function which used to work with XOOPS 2.0.18 but since i updated to the last version, each time i try to add a new category in my site, i press the submit button in the form and the data get into the db 3 times! Anybody has an idea why this might be happening?? the function which stores the data is the following and is used in the admin section of the module not in the front end!

Quote:
function addCat()
{
global $xoopsDB, $_POST, $myts, $eh;
$pid = intval($_POST["cid"]);
$title = $myts->makeTboxData4Save($_POST["ctitle"]);
if (empty($title)) {
redirect_header("categories.php",2,_MD_ERRORTITLE);
exit();
}
if ( ($_POST["imgurl"]) || ($_POST["cimgurl"]!="") ) {

$imgurl = $myts->makeTboxData4Save($_POST["cimgurl"]);
}

$sql = sprintf("INSERT INTO %s (pid, title, imgurl) VALUES (%u, '%s', '%s')", $xoopsDB->prefix("addresses_cat"), $pid, $title, $imgurl);
$xoopsDB->query($sql) or $eh->show("0013");

redirect_header("categories.php",1,_MD_NEWCATADDED);
}


this happens to another file for inserting and manipulating other data as well!havent checked the rest of the admin files to see if it happens to all of them! its weird though!
whttp://www.guidemap.gr - Beta is out...

2
kerkyra
Re: submit pressed once-data inserted 3 times!
  • 2008/7/26 18:16

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


nevermind! it seems that it was a firefox problem!!!! I updated to version 3 and its all back to normal now!!
whttp://www.guidemap.gr - Beta is out...

Login

Who's Online

423 user(s) are online (131 user(s) are browsing Support Forums)


Members: 0


Guests: 423


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits