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

$_POST not working

P: 3
Working on upgrading a site and after moving everything onto a test server (localhost) things started to get real buggy. Went through and checked all my links and everything comes up fine, but it seems that all of my $_POST variables are not reading at all. Since the code hasn't changed much over the move (just one or two paths that the previous guy did a little funny) I'm assuming that it's some sort of configuration issue. Help would be appreciated.

Linux Fedora Core 5
Working in PhP 5.1.2

[PHP]
$uname = $_POST['username'];
$ID = $_POST['ID'];
$pword = $_POST['password'];
$pword_2 = $_POST['password_2'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$addr_1 = $_POST['addr_1'];
$addr_2 = $_POST['addr_2'];
$email = trim($_POST['email']);

$phone = trim($_POST['phone']);
$phone = str_replace("(", "", $phone);
$phone = str_replace(")", "", $phone);
$phone = str_replace(" ", "", $phone);
$phone = str_replace(".", "", $phone);
$phone = str_replace("-", "", $phone);

$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$type = $_POST['user_type'];
[/PHP]

getting these errors:

Notice: Undefined index: username in /var/www/html/atlbiomed/scheduler/user_manager.php on line 5

Notice: Undefined index: ID in /var/www/html/atlbiomed/scheduler/user_manager.php on line 6

Notice: Undefined index: password in /var/www/html/atlbiomed/scheduler/user_manager.php on line 7

Notice: Undefined index: password_2 in /var/www/html/atlbiomed/scheduler/user_manager.php on line 8

Notice: Undefined index: first_name in /var/www/html/atlbiomed/scheduler/user_manager.php on line 9

Notice: Undefined index: last_name in /var/www/html/atlbiomed/scheduler/user_manager.php on line 10

so on and so on...

Any help would go a very long way.
Dec 21 '06 #1
Share this Question
Share on Google+
3 Replies


b1randon
Expert 100+
P: 171
Working on upgrading a site and after moving everything onto a test server (localhost) things started to get real buggy. Went through and checked all my links and everything comes up fine, but it seems that all of my $_POST variables are not reading at all. Since the code hasn't changed much over the move (just one or two paths that the previous guy did a little funny) I'm assuming that it's some sort of configuration issue. Help would be appreciated.

Linux Fedora Core 5
Working in PhP 5.1.2

[PHP]
$uname = $_POST['username'];
$ID = $_POST['ID'];
$pword = $_POST['password'];
$pword_2 = $_POST['password_2'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$addr_1 = $_POST['addr_1'];
$addr_2 = $_POST['addr_2'];
$email = trim($_POST['email']);

$phone = trim($_POST['phone']);
$phone = str_replace("(", "", $phone);
$phone = str_replace(")", "", $phone);
$phone = str_replace(" ", "", $phone);
$phone = str_replace(".", "", $phone);
$phone = str_replace("-", "", $phone);

$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$type = $_POST['user_type'];
[/PHP]

getting these errors:

Notice: Undefined index: username in /var/www/html/atlbiomed/scheduler/user_manager.php on line 5

Notice: Undefined index: ID in /var/www/html/atlbiomed/scheduler/user_manager.php on line 6

Notice: Undefined index: password in /var/www/html/atlbiomed/scheduler/user_manager.php on line 7

Notice: Undefined index: password_2 in /var/www/html/atlbiomed/scheduler/user_manager.php on line 8

Notice: Undefined index: first_name in /var/www/html/atlbiomed/scheduler/user_manager.php on line 9

Notice: Undefined index: last_name in /var/www/html/atlbiomed/scheduler/user_manager.php on line 10

so on and so on...

Any help would go a very long way.
Did you change from php4 to php5? I looked a the differences a while back and I know for sure that the POST data is handled differently between the two. Could that be causing your issues?
Dec 21 '06 #2

P: 3
Did you change from php4 to php5? I looked a the differences a while back and I know for sure that the POST data is handled differently between the two. Could that be causing your issues?
no, the other system is running the same system. The guidelines have changed, but I checked the syntax and everything there seems up to spec.
Dec 21 '06 #3

P: 3
Actually, it looks like none of my superglobals are working. my $_SESSION, $_GET, and $_REQUEST all seem unresponsive. Is this perhaps an issue with PEAR?
Dec 21 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.