forum.coppermine-gallery.net
No Support => Feature requests => Topic started by: 2newbie on June 15, 2005, 11:31:34 am
-
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)
-
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;
}
-
$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.