Results 1 to 5 of 5

Thread: is it possible to use links for POST info??

  1. #1
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default is it possible to use links for POST info??

    hi,
    I need to create a link, which would work as button for POST method... Is it possible?
    Because then i will use images for their nice appearance.
    Thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You could make a form with method post with an input type=image as a submit button and a input type=hidden for the data. Otherwise you would need javascript to either do something AJAX'y or to submit a hidden form with the method post.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    I have 2 forms...
    <form action='forumas_pr.php?id=$id' method='post' enctype='multipart/form-data'>
    <form action='forumas_pr.php?id=$id' method='post' enctype='multipart/form-data'>
    if I push oe of them, my php wont kow which I pushed, because each button has different effect... How I can make difference bettween them? 1.) method='post' 2.) method='post2' ??

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Give the forms names. <form name="">

    Also don't put variables in single quotes they wont be parsed.

  5. #5
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    php is: if(isset($_POST['submit'])) so how I can change that?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •