I inherited a PERl/PHP(and I am not familiar with) site and am getting an error when looking for a querystring value.
the original HREF is like:
<A class=listLink
href="artist_frame.shtml?artist_id=10"
target=cag_content>Artist 10</A>
and the code on the recieving page is:
and returns:
Notice: Undefined index: artist_id in C:\Inetpub\mysite\cgi\artist_frame.php on line 3
Is there something that I need to enable "$HTTP_GET_VARS[]" on the server? Otherwise I tried capturing the artist_id value from the querystring using:
($key, $id) = split(/=/,$ENV{'QUERY_STRING'},2);
#since there is only one variable
and I get:
Parse error: parse error, unexpected ',' in artist_frame.php on line 4
if I go with:
@vals = split(/=/,$ENV{'QUERY_STRING'});
I get:
Parse error: parse error, unexpected '=' in artist_frame.php on line 4
All this leads me to believe I a missing something on the server. Any suggestions?
Thanks....
the original HREF is like:
<A class=listLink
href="artist_frame.shtml?artist_id=10"
target=cag_content>Artist 10</A>
and the code on the recieving page is:
Code:
#!/usr/local/bin/php
<?php
$id = $HTTP_GET_VARS['artist_id'];
?>
and returns:
Notice: Undefined index: artist_id in C:\Inetpub\mysite\cgi\artist_frame.php on line 3
Is there something that I need to enable "$HTTP_GET_VARS[]" on the server? Otherwise I tried capturing the artist_id value from the querystring using:
($key, $id) = split(/=/,$ENV{'QUERY_STRING'},2);
#since there is only one variable
and I get:
Parse error: parse error, unexpected ',' in artist_frame.php on line 4
if I go with:
@vals = split(/=/,$ENV{'QUERY_STRING'});
I get:
Parse error: parse error, unexpected '=' in artist_frame.php on line 4
All this leads me to believe I a missing something on the server. Any suggestions?
Thanks....