Hi guys,
        I am working on a CGI script for Email Management. When I call
one cgi(main) from the other(sub.cgi) (on say form submit). I want to
return to the main.cgi again, and get the value by appending the value
pair to the url. This is working fine, however, everytime I pass a value
to sub.cgi, it gets appended at the URL string. This makes the URL
really long if the user navigated back and forth a lot. To eliminate
this, I have written below code. 

$orig_url = $ENV{'HTTP_REFERER'};
if ($orig_url = !~/$email_box/) {
$orig_url .= "&email=$emailadd";
} 

To make sure, if there is already no value pair added, then only I add
it. I suppose as the URL initially doesn't contain the string email_box,
it will get the value '', hence the if check is failing always.

Also, can someone suggest a way to trim off the previous value pair for
email_box=$emailadd, and always append only the latest.(I think this is
a better way of doing it)

Appreciate suggestions and help.

-Subbu  

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to