Parašė And2s· 2009 Bir. 23 21:06:17
#2
profile.php:
if (!isset($lookup) && !isset($nikas) || !isNum($lookup) && !isset($nikas)) {
fallback("index.php");
} else {
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$lookup' AND user_name='".$nikas."'");
if (dbrows($result)) { $data = dbarray($result); } else { redirect("index.php"); }
}
ir .htaccess:
RewriteRule ^([0-9,a-z,A-Z]+)-id([0-9]+).htm$ profile.php?lookup=$2&nikas=$1 [L]
Dabar tikrins ir nick.
Redagavo And2s· 2009 Bir. 23 21:06:55