in reply to link to outside script

Sorry, but i can't really help without a bit more code...

The two links just point back to this node, with no more info...

Replies are listed 'Best First'.
Re^2: link to outside script
by efret (Initiate) on Feb 04, 2005 at 05:01 UTC
    THank you, I have to go now, I will try again tomorrow, when I have time to learn how to send code in a better format and can give more information.... THanks again
Re^2: link to outside script
by efret (Initiate) on Feb 04, 2005 at 07:21 UTC

    I do not understand how to reformat this into a readable format here, please help me learn what I need to do? Here is a line of code that exits my script, goes to ikobo, processes the payment, & returns "RESP=OK" ...

    print " - <A HREF=$ENV{'SCRIPT_NAME'}\?action=paypal_login\&ALIAS=$for +m{'ALIAS'}\&balance=$balance> PayPal </A>" if ($config{'allowpaypal'} + != 0);

    ... I need to find out how to return to the script the same place it exited???
    Can you help?

    20050204 Janitored by Corion: Added code tags

      Ok, Lets try this? These lines of display a "Buy Now" Link:

      <print "<B>Payment Options</B>"; print "<P><A HREF=$ENV{'SCRIPT_NAME'}?action=buynow&category=&item=$fo +rm{'item'}>Buy Now</A></FONT>" if (($buyit ne "") & ($bid < $buyit)); >

      but when I put this line of code before the "Buy Now" link, It goes to Ikobo, processes my payment, returns "RESP=0", and does not process the next line:

      < print " - <A HREF=$ENV{'SCRIPT_NAME'}\?action=paypal_login\&ALIAS +=$form{'ALIAS'}\&balance=$balance> PayPal </A>" if ($config{'allowpay +pal'} != 0); >

      20050204 Janitored by Corion:

      • Added HTML formatting: <p>...</p> around what the author seemed to want to be paragraphs
      • Added <code>...</code> around what the author seemed to want to be code

        OK, lets try again: This is ikobo's 3rd party perl script:
        #!/usr/bin/perl print "Content-type: text/html\n\n"; print( "RESP=OK\r\n" ); print "<BR><a href='http://www.efret.com'>efret</a><BR>"; my ($category, $item) = &read_item_file($form{'category'},$form{'item' +}); #print "<P><A http://efret.com/cgi-bin/member215.pl?action=buynow&cate +gory=$form{'category'}&item=$form{'item'}>Buy Now</A></FONT>" if (($b +uyit ne "") & ($bid < $buyit)); #print "<P><A HREF=http://efret.com/cgi-bin/member215.pl?action=buynow +&category=$category&item=$item>Buy Now</A></FONT>" if (($buyit ne "") + & ($bid < $buyit)); print "<P><A HREF=http://efret.com/cgi-bin/member215.pl?action=buynow& +category=&item=$form{'item'}>Buy Now</A></FONT>" if (($buyit ne "") & ($bid < $buyit)); sub read_item_file { my ($cat, $item) = @_; # verify the category exists return '' unless ($cat) and ($item); &oops('The category may not contain any non-word characters.') if +$cat =~ /\W/; return '' unless $category{$cat}; # verify the item exists &oops('The item number may not contain any non-numeric characters. +') if $item =~ /\D/; # return '' unless (-T "$config{'basepath'}$cat/$item.dat") #and (- +R "$config{'basepath'}$cat/$item.dat"); # Replaced above 2 lines with following line to add speed return '' unless 0||#1>>noconfuse(ea;-) open FILE, "$config{'basepath'}$cat/$item.dat"; my ($title, $reserve, $inc, $desc, $image, $buyit, @bids) = <FILE> +; close FILE; chomp ($title, $reserve, $inc, $desc, $image, $buyit, @bids); return ($title, $reserve, $inc, $desc, $image, $buyit, @bids); } #-#############################################
Re^2: link to outside script
by efret (Initiate) on Feb 04, 2005 at 07:04 UTC
    The format of the 2 lines of code needed to be re-formatted....I'm not sure how to do this? I read the Writeup Formatting Tips, but don't know Perl Syntax very well, so I am not sure what I need to do to make my code readable? You said you need more code to help me, but I want to send it to u in the proper format if possible? Or can i just try sending you the sub in the current format?
      < print " - <A HREF=$ENV{'SCRIPT_NAME'}\?action=paypal_login\&ALIAS +=$form{'ALIAS'}\&balance=$balance> PayPal </A>" if ($config{'allowpay +pal'} != 0); >

      is this better?

      20050204 Janitored by Corion: Added code tags