Jump to content

Add username to url


Beppis

Recommended Posts

I have an url in the database. I want to add an specific ending for each and single user.

like:

index.php?user=USERNAME.

I need to get the url from a table in the database like

 

Can anyone help me? :)

$sql = "SELECT * FROM tb_ads2 WHERE id='$adse'";
$result = mysql_query($sql);        
$row = mysql_fetch_array($result);
$urln = $row["url"];

 

I want to add an ending :)

Link to comment
https://forums.phpfreaks.com/topic/210209-add-username-to-url/#findComment-1096968
Share on other sites

I know that I have $row and $rowe :)

 

Got an error message now. Parse error: syntax error, unexpected ';' in line 97

$sql = "SELECT * FROM tb_ads2 WHERE id='$adse'";
$result = mysql_query($sql);        
$row = mysql_fetch_array($result);

if(isset($_COOKIE["usNick"]) && isset($_COOKIE["usPass"]))
{
$user=uc2($_COOKIE["usNick"]);

$sql2 = "SELECT * FROM tb_users WHERE username='$user'";
$result2 = mysql_query($sql2);        
$rowe = mysql_fetch_array($result2);

echo $row['url'].'?epi='.$rowe['username'].;                                                LINE 97
}


Link to comment
https://forums.phpfreaks.com/topic/210209-add-username-to-url/#findComment-1096989
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.