manipulating $_POST[]

Discussion in 'PHP' started by mehdiali, Nov 9, 2007.

  1. #1
    hi everyone
    image that i am in login.php page.after sumitting
    (<form method="POST" action="welcome.php">),
    i go to welcome.php page.
    so,is there any way to change value of $_post['username']
    without using the form.
    what do you think a bout socket programming?
    thank you in advance.
     
    mehdiali, Nov 9, 2007 IP
  2. powerspike

    powerspike Peon

    Messages:
    312
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you could use ajax ?

    you can get data to and from the page without changing the page itself.
     
    powerspike, Nov 9, 2007 IP
  3. mehdiali

    mehdiali Peon

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i mean i want to skip from input filters(if they are on login.php page).
    or minimal go to welcom.php page directly and fill the $_POST myself whitout any problem.
     
    mehdiali, Nov 9, 2007 IP
  4. spy_force

    spy_force Well-Known Member

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    123
    #4
    <body onLoad="document.forms['form_id'].submit();">
    add id to your form
    <form method="POST" action="welcome.php" id="form_id">
     
    spy_force, Nov 9, 2007 IP
  5. bobb1589

    bobb1589 Peon

    Messages:
    289
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #5
    your making it seem like you dont want a login at all?
     
    bobb1589, Nov 9, 2007 IP
  6. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If it's your site, just use $_POST['username'] = 'somethingelse';

    If you're logging in somewhere and trying to change your username to take over another account, no.
     
    decepti0n, Nov 9, 2007 IP
  7. mehdiali

    mehdiali Peon

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    you didn't understand.
    look at here !
    they are not my page.
    i just know there is $_POST['username'] in welcome.php page.i want to assign a value
    to $_POST without login(submitting the form).think about hacking.
    is there any way to do this?
    hops you will get it!
     
    mehdiali, Nov 9, 2007 IP
  8. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #8
    As far as I know, no, unless they're have register_globals on, in which case (I assume) it'd be as simple as adding ?username=whatever to the url.
     
    decepti0n, Nov 10, 2007 IP