One more question on post and get

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 6
Joined: Sat Jul 05, 2003 12:57 am

Sat Jul 05, 2003 1:03 am

It sounds like you've fallen into the usual trap for post php 4.2.

From this point on the php developers (quite rightly) decided to not make post, and get variables global.

any of these variables can be referenced from the $_POST and $_GET arrays.

Alternatively you can just change your php.ini configuration file to set register_globals to "On":

register_globals = On

Or uncomment it if it's already there, be warned however that this is a security risk if you do not thoroughly test your code.

Hope that helps :D

User avatar
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Mon Jul 07, 2003 9:07 am

What you could do at the top of the php files any variables that are passed in you can define like

Code: Select all

$username = $_POST['username'];
$submit = $_POST['submit'];

and so on.

Post Reply