By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,662 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

Re: PHP5

P: n/a
in*********@gmail.com wrote:
I have been using the php form below for a while now and all of a
sudden it stopped working. I contacted the company that hosts our
website and they think it is because they switched to php5. They
recommend that we don't use global variables - but I don't even know
what that means. I would appreciate if someone could look over the
code below and let me know what changes would need to be made to make
this compatible with php5 and without using global variables:
<Lots of code snipped>

In their upgrade, they turned off register_globals - which is a good thing.

Since you are posting your form, you need to look in the $_POST array
for the values, i.e. instead of

if ($op != "ds") {

you need to use $_POST['op']. Additionally, you should check to see if
the array element is set (with isset()) before using it, so your phrase
would be:

if (isset($_POST['op'] && $_POST['op'] == 'ds') {

Also, you should read up on register_globals at www.php.net.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Sep 2 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.