Click to See Complete Forum and Search --> : woo! found one problem, now i have another;) (cgi stuff)


Fandelem
02-20-2001, 08:25 PM
alright, well, a few hours ago i had posted a message about why netscape would *not* print out my documents. here is my solution:

(few lines of my code)

sub header {
print <<"(Dynamic Created Document)";
(imagine an enter here.. linuxnewbie cuts it off. grunt.)
Content-type: text/html


<HTML>
<HEAD>


this code does not work in netscape. and the reason? Content-type: text/html must be the *very* first line.

so the code:

sub header {
print <<"(Dynamic Created Document)";
Content-type: text/html


<HTML>
<HEAD>

works and is the proper way to display it in netscape (IE apparently doesn't care, heh)

anyways. on to my bigger problem. perhaps some guru's can help me :o)

(netscape)
http://www.fandelem.com/cgi-bin/grabpoem.pl?submittedworks=yes&poem=mr. netscape tester


(IE)
http://www.fandelem.com/cgi-bin/grabpoem.pl?submittedworks=yes&poem=the%20first%20poem


notice the difference? with the %20's as spaces (i believe) - will, how the heck do i get netscape to send those spaces?

i have my method=post.

any suggestions?

thanks :}

~kyle

[ 20 February 2001: Message edited by: Fandelem ]

Raskii
02-20-2001, 09:16 PM
Netscape really doesn't like spaces in it's address bar (or location bar or whatever it is :P). if the %20 doesn't work, I don't know if anything will.

Fandelem
02-20-2001, 11:35 PM
okay. i now decided to just put _ where ever there are spaces. however, for the actual linkage, i'd like it to show the _'s but for the text i'd like perl to get rid of the _'s - how? :D

right now, i have:


/<A\sNAME=\"(.*)\">/i and print "<A HREF=\"http://www.fandelem.com/cgi-bin/grabpoem.pl?choice=$poem_month&poem=$1\">$1</a><p>\n";


and for the last $1 i need to figure out some way to make it replace _'s with spaces. ugh ;o) is this even possible?