Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jun 2010
    Location
    Earth
    Posts
    305
    Thanks
    27
    Thanked 2 Times in 2 Posts

    don't want to use $_GET

    I am currently using a $_GET to reset info in a table. I want to be able to reset that info without having the URL change, but not sure how or where to look. I thought that I could use $_POST but can't figure out how.

    url starts out as index.php

    have a link to reset data
    Code:
    <a href='index.php?id=reset'>reset to 0</a>
    url changes to index.php?id=reset

    can someone help point me in a good direction?
    Last edited by harkly; 11-21-2011 at 07:23 PM.

  • #2
    Senior Coder
    Join Date
    Apr 2010
    Posts
    1,233
    Thanks
    51
    Thanked 100 Times in 99 Posts
    You could use Javascript to clear or reset the fields.

    http://www.javascript-coder.com/java...set-form.phtml
    Been a sign maker for 7 years. My business:
    American Made Signs

  • #3
    Regular Coder
    Join Date
    Jun 2010
    Location
    Earth
    Posts
    305
    Thanks
    27
    Thanked 2 Times in 2 Posts
    I thought about using JavaScript but I need to code it for when that is turned off

  • #4
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,089
    Thanks
    51
    Thanked 506 Times in 493 Posts
    Then you'll have to use a form and a button to use $_POST. IF you don't want to use $_GET, and don't want to use Javascript/Ajax then $_POST is the only other option with the use of a form.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #5
    Regular Coder
    Join Date
    Jun 2010
    Location
    Earth
    Posts
    305
    Thanks
    27
    Thanked 2 Times in 2 Posts
    Thanks!

    I was able to modify $_POST to get what I needed.


  •  

    Posting Permissions

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