cant figure it out!

They have: 5,633 posts

Joined: Jan 1970

i have a cgi script that allows visitors to reccommend my site to friends, but i want to customize the confirmation page so that it redirects the user to another thank you page that looks like the rest of my site, but when i try to do this i get an "Internal Server Error"
can you fix this :

<html>
<head><title>wait......</title>
<SCRIPT LANGUAGE="JavaScript">
var howMany = 2; // max number of items listed below
var page = new Array(howMany+1);

page[0]="http://www.doubleok.com/referthank.html";
page[1]="http://www.doubleok.com/referthank.html";
page[2]="http://www.doubleok.com/referthank.html";

function rndnumber(){
var randscript = -1;
while (randscript < 0 | | randscript > howMany | | isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1));
}
return randscript;
}
quo = rndnumber();
quox = page[quo];
window.location=(quox);
// End -->
</SCRIPT>
</HEAD><BODY>
<p><center>
<A HREF=
"http://webmasterexchange.com/cgi-bin/b/rd2.cgi?a=224p1&s=468x60" target="_top"><IMG SRC=
"http://webmasterexchange.com/cgi-bin/b/bi2.cgi?a=224p1&s=468x60" WIDTH="468" height="60" border=0
HSPACE=0 VSPACE=0 alt="webmasterexchange.com banner exchange"></A>
</center></p>
</BODY>
</HTML>

So that my script prints it out in this form:
print "Content-type: text/html\n\n";
print " <html>"\n;

everytime i try to do this is doesnt work!!!

------------------
Click Here For Webmasters Only Site!!
[email protected]

It worked for me, Click here to make money!!

They have: 12 posts

Joined: Dec 1999

have you chmodded the files to 755 or whatever it says to chmod it to?

They have: 5,633 posts

Joined: Jan 1970

yes i chmod it it to 755, but i think it may be a fault of mine when i use
print "
or
print '
i just dont know!!

------------------
Click Here For Webmasters Only Site!!
[email protected]

It worked for me, Click here to make money!!

They have: 2,390 posts

Joined: Nov 1998

What is the URL this is occuring at?
Is the cgi script small enough to display here?
JP

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.