[Solved]: Help making a <a href> with referer, is this possible? [Solved]: Help making a <a href> with referer, is this possible?
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

[Solved]: Help making a <a href> with referer, is this possible?

Started by net, March 22, 2008, 09:39:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

net

Hi,

I've added your documented "hack" in displayimage.php to tell users to register and login to view full image

if (!USER_ID) cpg_die(ERROR, 'You need to <a href=register.php><u>register</u></a> and <a href=login.php><u>login</u></a> to view this page', __FILE__, __LINE__);

This works great, but i saw that the true login button does refer to the actual page the user was on when he clicked the login button, so once hes logged on he will be kicked back to the image he was trying to display.

I checked include/themes.inc.php to see what code is done and it seems that i need to add "login.php?referer=$REFERER" however this does not seem to work in html, any clue how i could do it another way?

Nibbler


if (!USER_ID) cpg_die(ERROR, 'You need to <a href="register.php">register</a> and <a href="login.php?referer='.$REFERER.'">login</a> to view this page', __FILE__, __LINE__);


Should work.

net