<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1000853" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1000853</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/return-referring-page#comment-1003635</link>
    <description> &lt;p&gt;Thanks for your help rob.  I tried your simple fix that calls the environment variable, but I get premature end of script header error.  I ran the edited script against a debugger that my ISP provides, and it doesn&#039;t show any problems, but then again it might just be a syntax checker.  I was also thinking about putting something like:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;code:&lt;/p&gt;
&lt;pre&gt;

if ($useredirect eq &#039;1&#039;) {
	print &quot;Content-type: text/html &amp;lt;html&amp;gt;&amp;lt;META HTTP-EQUIV\=&#039;refresh&#039; CONTENT=&#039;0; url\=www.aroma-massage.com/cart.html&#039;&amp;gt;&amp;lt;/html&amp;gt;\n&quot;;
        
	}
[/code]
But i don&#039;t know if that will work. I might need to ad some escapes in the code above, if it will work at all. I am pretty new at PERL and was handed this script to modify.  I will give you the entire subroutine code below so that you might be able to see why I&#039;m getting 500 errors when I try your fix.  Thanks so much for you insight.

&lt;BLOCKQUOTE&gt;code:&lt;pre&gt;

# Add a item to the cart, show review page, unless they included a redirect variable.
sub add_item {
open (REFFILE,&quot;$reffile&quot;) &amp;#0124; &amp;#0124; print &quot;Content-type: text/html\n\n Can&#039;t Open $reffile(r): $!\n&quot;;
@LINES=&amp;lt;REFFILE&amp;gt;;
close(REFFILE);
$SIZE=@LINES;
open (REFFILE,&quot;&amp;gt;$reffile&quot;) &amp;#0124; &amp;#0124; print &quot;Content-type: text/html\n\n Can&#039;t Open $reffile(r): $!\n&quot;;
print REFFILE &quot;$date\| $ENV{&#039;REMOTE_HOST&#039;}\| $ENV{&#039;HTTP_USER_AGENT&#039;}\|$usercurr\|NULL\|\n&quot;;
for ($i=1;$i&amp;lt;$SIZE;$i++) {
   	$_=$LINES[$i];
	my($itemname, $itemprice, $itemquant, $weight, $itemid) = split(/\|/,$_);
	print REFFILE join &quot;\|&quot;, $itemname,$itemprice,$itemquant,$weight,$itemid,&quot;\|\n&quot;;
	}
print REFFILE join &quot;\|&quot;, $FORM{&#039;itemname&#039;},$FORM{&#039;itemprice&#039;},$FORM{&#039;itemquant&#039;},$FORM{&#039;weight&#039;},$FORM{&#039;itemid&#039;};
print REFFILE &quot;\|\n&quot;;
close(REFFILE);
if ($useredirect eq &#039;1&#039;) {
	print &quot;Content-type: text/html\n\n &amp;lt;html&amp;gt;&amp;lt;body bgcolor=\#ffffff onload=\&quot;history.back()\&quot;&amp;gt;\n&quot;;

	}
#if ($FORM{&#039;redirect&#039;}) {
#		print &quot;Location: $FORM{&#039;redirect&#039;} \n\n&quot;;
#		}
else {
	&amp;amp;review_items;
	}
}
[/code] &lt;/pre&gt;&lt;/blockquote&gt;&lt;/pre&gt;&lt;/blockquote&gt;</description>
     <pubDate>Wed, 01 Dec 1999 22:07:00 +0000</pubDate>
 <dc:creator>aconite</dc:creator>
 <guid isPermaLink="false">comment 1003635 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/return-referring-page#comment-1003634</link>
    <description> &lt;p&gt;Hmm, not sure if I understand this completely, but here goes nothing    &lt;img src=&quot;http://www.webmaster-forums.com/ubb/wink.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
&lt;p&gt;$lasturl=$ENV{&#039;HTTP_REFERER&#039;};&lt;br /&gt;
#put this in when the user is at the URL you want them to be when they are redirected later on.&lt;/p&gt;
&lt;p&gt;if ($useredirect eq &#039;1&#039;)&lt;br /&gt;
{print &quot;Location: $lasturl&quot;;}&lt;/p&gt;
&lt;p&gt;else{}&lt;/p&gt;
&lt;p&gt;Try that, if it doesn&#039;t work sorry   &lt;img src=&quot;http://www.webmaster-forums.com/ubb/wink.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
&lt;strong&gt;If you counted 24 hours a day, it would take 31,688 years to reach one trillion.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;[This message has been edited by robp (edited 01 December 1999).]&lt;/p&gt;
 </description>
     <pubDate>Wed, 01 Dec 1999 20:34:00 +0000</pubDate>
 <dc:creator>Rob Pengelly</dc:creator>
 <guid isPermaLink="false">comment 1003634 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
