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
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.
NO SUPPORT in FEATURE REQUESTS (http://forum.coppermine-gallery.net/index.php?topic=15866.0)
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
???
Please post the actual code that you are using.
$keys = array_keys($_GET);
$id = $keys[0];
if (is_numeric($id)){
header('Location: http://www.yoursite.com/coppermine/profile.php?uid='.$id)
exit;
}
Quote from: 2newbie on June 16, 2005, 04:18:12 PM
$keys = array_keys($_GET);
$id = $keys[0];
if (is_numeric($id)){
header('Location: http://www.yoursite.com/coppermine/profile.php?uid='.$id)
exit;
}
Your domain is yoursite.com?
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.