link prompt login

They have: 164 posts

Joined: Nov 2001

hi,

i want my page to have two links..one is to view the report and another one is manage. the existing one is like this:

<a href="$cgi_bin_url/adcenter.cgi?task=campaign_report&cid=$cidref[$k]->{CID}&cache=$cache">View Report</a>
'

i want to add another link:

<a href="$cgi_bin_url/adcenter.cgi?task=edit_campaign&cid=$cidref[$k]->{CID}&cache=$cache">Manage</a>
'

when i clicked the manage, it keep prompt me to go to login. what is wrong with my link? pls advice..

They have: 157 posts

Joined: Mar 2002

Sounds like its in your adcenter.cgi code. If you want to login once and only once then you have to make the code check for the existence of your username and pass first and then check that against your flat-file or database for authentication. The username and pass can be carried around with the user in the form of a cookie or session. I prefer session myself.
Can't tell much from your post anyway. You may want to provide more info. for others to help you. I myself pretty much stay away from perl, so this is as far as I go.

They have: 601 posts

Joined: Nov 2001

> I myself pretty much stay away from perl,
> so this is as far as I go.

Can I ask why?

They have: 157 posts

Joined: Mar 2002

Huh?

If your refering to me, in perl you have to write this long code just to proccess post and get for one. Another is that PHP is much more modulated in its simplicity. Kinda like Chinese compared to English, you know in those movies where the English part is over yet the Karate expert is still moving his mouth.
When I was into Perl it took me months to learn it. Then when I met PHP, it took only days to learn the same level of knowledge. That's not saying one is better than the other. They both have advantages and disadvantages.
Anyways, did you have something to add to help out joyce with her delima?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Joyce, you have to login to manage it, don't you? When you login in, it still sends you to the login?

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Joyce tends to code in PHP. PHP can be run as a CGI and that is valid PHP syntax for classes.

I would also look into your adcenter.cgi file.
Check for where $task=="edit_campaign" (as that is the only thing I see different in the URLs)

Also, hover over the two links in a browser, does cid and cache match for both links?

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 601 posts

Joined: Nov 2001

theprofessional

Hey, I wasn't criticizing your choice of programming language. Even Perl's motto is TMTOWTDI (There's more than one way to do it!)! I was just wondering. I often ask this question to try and understand people's preferences, not to convert or criticize - I'm just genuinely interested.

> Anyways, did you have something to add to help out joyce with her
> delima?

Not at this stage, no. As soon as she can provide more information to us all, as a community - then I'm sure someone even if this person is not me, can help her out. I do hope so - Joyce is a valued member of this forum.

Rgds

- wil

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.