Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] One last question...

Expand Messages
  • Charles K. Clarkson
    Franki ... Could write as: $redirect .= &$tag=$form{$tag} ; ... You should consider using the CGI module. It handles all this for
    Message 1 of 1 , Jul 1, 2001
    • 0 Attachment
      Franki <frankieh@...>

      : Hi all,
      : This list is unusually quiet tonight... but I'll
      : ask anyway in case an expert is on hand to offer
      : advice..
      : I have this loop:
      : foreach $tag ( sort ( keys %form ) )
      : {
      : $redirect .= "&" . $tag . "=" . $form{ $tag };

      Could write as:
      $redirect .= "\&$tag=$form{$tag}";

      : }
      : # Now re-direct the browser
      : print "Location: $redirect\n\n";
      : Basically, it is creating a post url with all the
      : keypairs in it..
      : I need to add a line or two to it, to check the values,
      : and if they contain any spaces.. to swap the spaces to
      : something like %20 so that the spaces don't cause
      : everything after the first one to be ignored and not
      : added to the url...
      : Think I am a little over my head here, I am still
      : new to this....

      You should consider using the CGI module. It handles
      all this for you. The use of $form{tag} above, indicates
      the use of cgi-lib.pl or a home-rolled form input
      routine. While this is good for learning, it sucks for
      creating real web apps. I f the book you are using to
      learn from is not using CGI.pm, get another book. I
      borrow mine from the public library before I buy them.

      Charles K. Clarkson
      Clarkson Energy Homes, Inc.
    Your message has been successfully submitted and would be delivered to recipients shortly.