944,129 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4496
  • PHP RSS
Oct 2nd, 2007
0

PHP 4.3.11 and problems with $HTTP_SERVER_VARS['REQUEST_URI']?

Expand Post »
Hey sorry for any unintentioned broken rules - I'm a PHP newbie here, and a newbie to the list!
Does anyone know of any problems with PHP 4.3.11 and using
$HTTP_SERVER_VARS['REQUEST_URI']? I"m having a hard time getting
php generated html links (ahref tags) in my php page to work. I'm including the code below.
I tested out the first conditional statement using the three variables 's', 'st' and 'w'and it works, but when you try to
click on any of the three links (subject, workshop, state) nothing happens

here is the piece of code below, I commented the places that work and the places
that don't work

thnx in advance!


========================================================================================
[code = php]
<a href=<?= $PHP_SELF; ?>?v=s">view by subject </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href=<?= $PHP_SELF; ?>?v=w>view by workshop</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href=<?= $PHP_SELF; ?>?v=st>view by state</a><br><br>

<?
$v = ($v)?$v:'w';

include_once('../webeditor/config.php3'); // conf variables
include_once('../webeditor/functions.inc.php');// functions
dbconnect();

$workshops = get_cw_listinfo('cw_workshop'); #ten12_dump($workshops);
$subjects = get_cw_listinfo('cw_subject'); #ten12_dump($subjects);
$states = get_stateinfo(); #ten12_dump($states);

/* THIS PART WORKS FINE....
if ($v=='w' && !$s && !$w && !$st){

foreach($subjects as $sid => $subject){
?>
&bull;&nbsp;<a href=<? $PHP_SELF ?> ?s=<?= $sid ?> >
<?= $subject['name'] ?>
</a><br><br>
<?
} //end foreach
}*/

/THIS IS THE PART THAT DOES NOT WORK/
if($v=='s' && !$s && !$w && !$st){
foreach($subjects as $sid => $subject){
?>
&bull;&nbsp;<a href=<? $HTTP_SERVER_VARS['PHP_SELF']; ?> ?s=<?= $sid ?> >
<?= $subject['name'] ?>
</a><br><br>
<?

[/code]
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
janaki07 is offline Offline
1 posts
since Oct 2007
Oct 23rd, 2007
0

Re: PHP 4.3.11 and problems with $HTTP_SERVER_VARS['REQUEST_URI']?

It may be that the long string is disabled. I remember that certain array's like that started getting phased out in 4.0.

Please refer to the following page for more information to get the commands that are more up to date.


http://php.net/reserved.variables


sorry if this doesn't help
Reputation Points: 10
Solved Threads: 3
Light Poster
DGStudios is offline Offline
31 posts
since Mar 2006
Oct 23rd, 2007
0

Re: PHP 4.3.11 and problems with $HTTP_SERVER_VARS['REQUEST_URI']?

what do you want to do exactly?
Reputation Points: 6
Solved Threads: 19
Posting Whiz in Training
fatihpiristine is offline Offline
283 posts
since Sep 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Complex Query with PHP
Next Thread in PHP Forum Timeline: Uploading progress





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC