1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can i use post and get together?

Discussion in 'PHP' started by baris22, Feb 13, 2010.

  1. #1
    hello,

    if i do this way will it cause any problem?
    SEMrush
    
    
    if (isset($_POST['order_ready'])) 
    {
    $id = $_GET['id'];
    $ref = $_GET['ref'];
    $orderr_ready = $_GET['orderready'];
    
    }
    <form name="order_ready" action="<?=$PHP_SELF;?>?id=<?=$orderr_id;?>&ref=<?=$orderr_reference;?>&orderready=No" method="post">
        <input type="submit" name="order_ready" value="Mark as Order NOT READY" style="width: 340px; height:40px" />
    </form>
    
    
    PHP:
     
    baris22, Feb 13, 2010 IP
    SEMrush
  2. sarahk

    sarahk iTamer Staff

    Messages:
    26,438
    Likes Received:
    3,957
    Best Answers:
    111
    Trophy Points:
    665
    #2
    You can because the form can be submitted to /myscript.php?id=123

    However this isn't the norm.

    If you have any queries about what is being passed just do a var_dump() on $_POST and $_GET
     
    sarahk, Feb 13, 2010 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,579
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    Well the way u want it it could be possible but as a form its tough to use both
     
    Bohra, Feb 13, 2010 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    26,438
    Likes Received:
    3,957
    Best Answers:
    111
    Trophy Points:
    665
    #4
    Quite right, the actual inputs to the form have to be one or the other

    Remember to use &amp; as well!
     
    sarahk, Feb 13, 2010 IP
  5. nadiralishah_webexpert

    nadiralishah_webexpert Guest

    Messages:
    229
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    for sure you can use both. should work perfectly.. i do use both sometimes.. and it works for me.
     
    nadiralishah_webexpert, Feb 14, 2010 IP