gallery/?user => gallery/profile.php?uid=2 gallery/?user => gallery/profile.php?uid=2
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

gallery/?user => gallery/profile.php?uid=2

Started by 2newbie, June 15, 2005, 11:31:34 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

2newbie

Hello guys
i am a newbie in cpg users
i want to know can i do somthing like this

domain.com/gallery/?user

and go to profile page of user ( NOT USER GALLERY )

Example

domain.com/gallery/profile.php?uid=2

Tnx

Nibbler

Add this code into the top of your index.php

$keys = array_keys($_GET);
$id = $keys[0];
if (is_numeric($id)){
header('Location: http://www.yoursite.com/coppermine/profile.php?uid='.$id)
exit;
}


Specify the actual url of your site in the code.

Joachim Müller


2newbie

Quote from: Nibbler on June 15, 2005, 03:36:30 PM
Add this code into the top of your index.php

$keys = array_keys($_GET);
$id = $keys[0];
if (is_numeric($id)){
header('Location: http://www.yoursite.com/coppermine/profile.php?uid='.$id)
exit;
}


Specify the actual url of your site in the code.

I try this
but i get and error

Parse error: syntax error, unexpected T_EXIT in c:\wamp\www\pcg\index.php on line 25

???

Tranz

Please post the actual code that you are using.

2newbie

$keys = array_keys($_GET);
$id = $keys[0];
if (is_numeric($id)){
   header('Location: http://www.yoursite.com/coppermine/profile.php?uid='.$id)
   exit;
}

Tranz


Joachim Müller

missing semicolon at the end of the line   header('Location: http://www.yoursite.com/coppermine/profile.php?uid='.$id)

2newbie: please don't make it so hard for us to support: if you're asked to paste the actual code, then you shouldn't replace stuff with pseudo-code like "yoursite.com", as it's likely to introduce errors.