2
use the Php header() function of the XOOPS redirect_header() function (see it in include/functions.php) to redirect user to another page or to the same page.
Two notes :
1/ Use the XOOPS API to talk with the database (use the database object), and never use, directly, the MySQL functions, for example :
$db =& Database::getInstance();
$result = $db->query(....);
2/ Use the sanitizer before to use external data (especially coming directly for the user) in your sql queries.
What you are doing actually is dangerous and there as some security issues.
Use the XOOPS MyTextSanitizer object, for example :
Quote:
$myts =& MyTextSanitizer::getInstance();
$title = $myts->addSlashes($title);
$db->query("select * from ".$db->prefix('mydb')." where title=".$title;
Finally, I suggest you to use the XoopsObject, everything we discussed is inside it, and buy a good book about Php.
Take the code of a module an study it.