Forum Moderators: coopster & phranque

Message Too Old, No Replies

CGI?View

         

Acternaweb

7:07 pm on Jun 19, 2001 (gmt 0)

10+ Year Member



Is there a special code needed when a script refers back to itself? I have a guestbook that refers to itself to show who singed it. The code has the scripts location and "cgi?view"

The link reads:
<A href="Http://www.domain.com/directory/cgi-bin/advguest.cgi?view">View the guest book</a>

I am modifying a script, but on the author's site the sript runs perfectly. Any ideas?

sugarkane

1:38 pm on Jun 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The ?view is just a way telling the script what action to perform next - for instance the same script could be responsible for posting to the guestbook or viewing it depending on how it's called.

Doing it the way shown is not perhaps best practice as it doesn't follow the CGI specification - a more correct version would be something like script.cgi?action=view to pass variable name / value pairs to the script.

If ?view is the way the author has written it though, then there shouldn't be any problems.

Are you having any specific trouble with the script?

Acternaweb

2:23 pm on Jun 20, 2001 (gmt 0)

10+ Year Member



Hi, the script runs fine other than the fact I can't see the results. I am able to "sign the guestbook" but when I go to view the guestbook, I get the error message saying it can not find "1"

in the code they say to put the url for the code to find it-self which I did.