| | |
PHP 4.3.11 and problems with $HTTP_SERVER_VARS['REQUEST_URI']?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2007
Posts: 1
Reputation:
Solved Threads: 0
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>
<a href=<?= $PHP_SELF; ?>?v=w>view by workshop</a>
<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){
?>
• <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){
?>
• <a href=<? $HTTP_SERVER_VARS['PHP_SELF']; ?> ?s=<?= $sid ?> >
<?= $subject['name'] ?>
</a><br><br>
<?
[/code]
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>
<a href=<?= $PHP_SELF; ?>?v=w>view by workshop</a>
<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){
?>
• <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){
?>
• <a href=<? $HTTP_SERVER_VARS['PHP_SELF']; ?> ?s=<?= $sid ?> >
<?= $subject['name'] ?>
</a><br><br>
<?
[/code]
•
•
Join Date: Mar 2006
Posts: 31
Reputation:
Solved Threads: 3
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
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
http://img.photobucket.com/albums/v6.../dgstudios.jpg
When all that is becomes one. That is the anomoly. That is... Death's Gate Studios (c) 2005
When all that is becomes one. That is the anomoly. That is... Death's Gate Studios (c) 2005
![]() |
Similar Threads
- Apache-PHP problems... (IT Professionals' Lounge)
- Date Field in MySQL with PHP /add/edit/delete (PHP)
- PHP code has ISSUES-help me (PHP)
- vBulletin mod_rewrite (PHP)
- mysql php problems (PHP)
- MS Outlook 2003 problem (Windows Software)
- Seeting up and calling variables stored in sessions (PHP)
- Redirecting images depending on the page they are displayed on. (Linux Servers and Apache)
Other Threads in the PHP Forum
- Previous Thread: How to insert new line character
- Next Thread: Make my own IM program and MySpace Clone.
| Thread Tools | Search this Thread |
.htaccess ajax apache api array autocomplete beginner binary broken cakephp checkbox class cms code cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error errors execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google href htaccess html image include insert integration ip java javasciptvalidation javascript joomla keywords limit link login loop mail matching menu mlm mod_rewrite multiple mysql oop paypal pdf php problem query radio random recursion recursive regex remote script search server sessions shot sms soap source space sql subscription syntax system table tutorial tutorials update upload url validation validator variable video web xml youtube





