112
i found this code on another place and it works to link to profile page but how can I cahnge it to go to userpage so it will go dirctly to the website built by nenber.
<?php
include("../mainfile.php");
isset($_GET['link'])? $uname = $_GET['link'] : $uname = '';
if ($uname != ''){
$sql= sprintf("SELECT uid FROM %s WHERE (uname = '%s')",$xoopsDB->prefix("users"), $uname);
$result = $xoopsDB->queryF($sql);
list($uid) = $xoopsDB->fetchRow($result);
if ($uid > '0'){
$redirect_to = XOOPS_URL.'/userinfo.php?uid='.$uid;
} else {
$redirect_to = XOOPS_URL.'/index.php';
}
} else {
$redirect_to = XOOPS_URL.'/index.php';
}
header('location: '.$redirect_to);
Musicians for musicians entertaining the world, what starts as a dream can live in reality!