Search
Left Quote    Black holes are where God divided by zero.
- Steven Wright    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: member system - register.php HTTP_POST_VARS troubles
  This user is offline  drew
  Subject: "member system - register.php HTTP_P..." Posted: @ 10:34 pm on Dec 03 2005   
Member #: 112
Rank: User - (4)
Since: 12/03/05
Posts: 4

I was having a hulluva time getting the part:
if(isset($HTTP_ POST_VARS['subm it']))
to ever become true. After some reading I discovered that php5 has register_global s turned off by default for security purposes.
http://us3.php. net/manual/en/s ecurity.globals .php

Exchanging the line
if(isset($HTTP_ POST_VARS['subm it']))
with
if(isset($_POST ['submit']))

seems to make the thing breathe again. Not sure if it's an answer to the problem, as I haven't gotten the system working yet!



    Viewed: 8,545 Times | Reply to This | To top
  This user is offline  Outka5t
  Subject: "re: member system - register.php HT..." Posted: @ 9:44 pm on Dec 12 2006    
Member #: 241
Rank: User - (2)
Since: 12/11/06
Posts: 2

  drew said...

< i>

Exchanging the line
if(isset($HTTP_ POST_VARS['sub mit']))
with
if(isset($_POST ['submit']))



Or exchange it with

if($_SERVER['R EQUEST_METHOD' ] == 'POST')

if you want stay upto date.




    Viewed: 8,393 Times | Reply to This | To top
  This user is offline  misterhaan
  Subject: "re: member system - register.php HT..." Posted: @ 3:35 pm on Dec 13 2006    

Member #: 5
Rank: User - (213)
Since: 02/11/05
Posts: 148
From: chair

register_global s being off should just mean you can't use $submit when you mean $_POST['submit '].

there's a difference between $HTTP_POST_VARS and $_POST though, so i suspect you're trying to use it in a way that works for $_POST but not $HTTP_POST_VARS . you really should be using $_POST anyway -- they introduced that a long enough time ago that it's probably hard to find an installation where it doesn't work.

also, i check if $_POST['submit '] is set to the value of my submit button, which is a little extra protection over simply checking that the page was requested using HTTP POST, as Outka5t suggests.




please note that the above post is likely made up in its entirety.

    Viewed: 8,375 Times | Reply to This | To top
  This user is offline  Genius
  Subject: "re: member system - register.php HT..." Posted: @ 1:56 am on Feb 25 2008    

Member #: 582
Rank: User - (77)
Since: 02/18/08
Posts: 76
From: kmmk

Finally! I found solution for my register.php problem! Thanks you Drew!
Solution was:   drew said...

< i> Exchanging the line
if(isset($HTTP_ POST_VARS['sub mit']))
with
if(isset($_POST ['submit']))




    Viewed: 6,761 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: member system - register.php HT..." Posted: @ 3:09 pm on Feb 25 2008    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Do I have HTTP_POST_VARS in the article? I need to update that...



    Viewed: 6,746 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank