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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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 1 Guest 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.