473,385 Members | 1,292 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

isset($_REQUEST['var']) works fine on one server but not on another

Hello,

The isset($_REQUEST['var']) works okay on other servers but not on
mine. The way the application works is the links are provided as:

http://url.com/cc.php?page=currencies&new

And then in cc.php the code is

if isset($_REQUEST['new']) {
...
}

The problem is with the above code it sees new as not set and the if
statement isn't exectuted. The same code on other servers works OK.

If I change the url to:
http://url.com/cc.php?page=currencies&new=
or
http://url.com/cc.php?page=currencies&new=something

Then the isset($_REQUEST['new']) will be true.

Is there any setting in my php config to make php see 'new' variable
as set as I've shown in the first url in this message?

Thanks,

Sean
email: sean "at" yip "dot" org
Jul 17 '05 #1
2 3109
Sean wrote:
Hello,

The isset($_REQUEST['var']) works okay on other servers but not on
mine. The way the application works is the links are provided as:

http://url.com/cc.php?page=currencies&new

And then in cc.php the code is

if isset($_REQUEST['new']) {
...
}

The problem is with the above code it sees new as not set and the if
statement isn't exectuted. The same code on other servers works OK.

If I change the url to:
http://url.com/cc.php?page=currencies&new=
or
http://url.com/cc.php?page=currencies&new=something

Then the isset($_REQUEST['new']) will be true.

Is there any setting in my php config to make php see 'new' variable
as set as I've shown in the first url in this message?


I don't think so. I always use 'script?php?var=' if I want an empty
variable 'var' that is 'set'.

JP

--
Sorry, <de*****@cauce.org> is een "spam trap".
E-mail adres is <jpk"at"akamail.com>, waarbij "at" = @.
Jul 17 '05 #2
Jan Pieter Kunst wrote:
I don't think so. I always use 'script?php?var=' if I want an empty
variable 'var' that is 'set'.


Read that as 'script.php?var=', of course. Sorry.

JP

--
Sorry, <de*****@cauce.org> is een "spam trap".
E-mail adres is <jpk"at"akamail.com>, waarbij "at" = @.
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: christian9997 | last post by:
Hi I don't seem to understand the way isset works. Here is some Javascript code that makes a call using PHP: // USER CAME BACK TO CHANGE LANGUAGE if (<?echo isset($_REQUEST)?>) {...
1
by: Alain Dhaene | last post by:
HI, I want to store some data in Sessions, but i have this error Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that...
7
by: melty | last post by:
This line of code make an "Undefined index" error on my PC, however it is okay on my friend's PC. Anyone has this experience? $somevar = $_REQUEST;
5
by: Dave Smithz | last post by:
Hi There, I have a PHP script that sends an email with attachment and works great when provided the path to the file to send. However this file needs to be on the same server as the script. ...
1
by: John Henckel | last post by:
This is the simplest, quickest, dirtiest, leanest, meanest, thumbnail/slideshow image viewer PHP script I have ever seen. Enjoy, John --------- CUT HERE ------------------- <?php
2
by: sathyashrayan | last post by:
Dear group, My question may be novice. I have seen codes where the isset() is used to test weather a user's session ($_SESSION) is set before entering a page. A kind of direct access to a page is...
2
by: basestring | last post by:
Hi I am busy now for many hours without luck I have a database and when I use PHP to add date to it, it works only one time when i want to add the next data, It doesn't work. but i don't get any...
4
by: Jason | last post by:
I'm troubleshooting a program that I didn't build, so forgive me on this one. It's called email.php, and it looks like a program that the original developer must have downloaded from somewhere. ...
7
by: Dave Kelly | last post by:
There has to be a name for what I want to do and I don't know what words to google for. I have a form here: http://www.texasflyfishers.org/firstpage.htm I want to submit it to the server and...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.