Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP, WAMP, Register_globals help

Featured Replies

Hi,

 

I'm following "PHP and MySQL for Dynamic Websites" (covering PHP 3+4 and MySQL 3+4 edition).

 

 

I am using WAMP as a local server to test all my pages on. I seem to have come across a problem where I have to create a form and form handler. For anyone who has the copy I'm using, I'm stuck on page 39+40 and keep on getting figure 2.4 instead of 2.3.

 

Apparently, according to the book, I've got to enable register_globals for my php. I did this by going into:

 

C:\wamp\bin\php\php5.2.5\php.ini

 

and editing the following:

 

; You should do your best to write your scripts so that they do not require

; register_globals to be on; Using form variables as globals can easily lead

; to possible security problems, if the code is not very well thought of.

register_globals = Off

 

into

 

; You should do your best to write your scripts so that they do not require

; register_globals to be on; Using form variables as globals can easily lead

; to possible security problems, if the code is not very well thought of.

register_globals = On

 

I restarted the browser and WAMP but I still keep on getting my form handler's response to be blank.

 

Can anybody help me?

  • Author

I have resolved the issue for now using:

 

$_POST[name]

 

but can anyone tell me what's wrong with my setup at the moment?

I'll willingly submit any code/files you need for inspection.

 

 

Thanks

I suggest you get an up to date book. Having register_globals can be a security risk.

 

There is no reason that you should be working on PHP 3+4 when there are plenty of books out for 5 and you benefit from the OOP that PHP 5 has.

 

You shouldn't need register_globals to use $_POST.

  • Author
I suggest you get an up to date book. Having register_globals can be a security risk.

 

There is no reason that you should be working on PHP 3+4 when there are plenty of books out for 5 and you benefit from the OOP that PHP 5 has.

 

You shouldn't need register_globals to use $_POST.

 

I'm aware that the latest edition is "PHP 6 and MySQL 5 for Dynamic Websites", but my local library network only has this edition and I can't buy a copy as I'm tight on funds so to speak.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.