#1
  1. No Profile Picture
    mrtesting
    Guest
    Devshed Newbie (0 - 499 posts)
    i have a php file name main.php

    i want to do a post and not a get since this action is to delete a row in the database.

    however, when i try to do a href onclick, the values are not passed to the main.php.

    why ?

    echo "You have " .$votesattach. " votes for this quote. Delete the Quote and Votes ?";
    echo "<form name=send1 method=post action=main.php?action='deleteit'>";
    echo "<input type=hidden name=action value=deleteit>";
    echo "<input type=hidden name=which value=$delete>";
    echo "<input type=hidden name=userno value=$userno></form>";
    echo "<a href=main.php onclick=document.send1.submit()>YES</a>";
    }

    how do i do pass values to the server using a post method ?
  2. #2
  3. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    ============begin quote===============

    echo "You have " .$votesattach. " votes for this quote. Delete the Quote and Votes ?";
    echo "<form name=send1 method=post action=main.php?action='deleteit'>";
    echo "<input type=hidden name=action value=deleteit>";
    echo "<input type=hidden name=which value=$delete>";
    echo "<input type=hidden name=userno value=$userno></form>";
    echo "<a href=main.php onclick=document.send1.submit()>YES</a>";

    ================end quote===============

    You're trying to use get and post both. Look at the 'action' url in your form tag.

Similar Threads

  1. Gif co-ordinates passed as form variables.
    By glog in forum PHP Development
    Replies: 3
    Last Post: February 2nd, 2004, 05:11 PM
  2. HTTP Error 400: Bad Request, with basic form
    By crackwombat in forum PHP Development
    Replies: 1
    Last Post: January 23rd, 2004, 07:40 PM
  3. Adding form values based on variable selection
    By lamborn in forum HTML Programming
    Replies: 0
    Last Post: January 17th, 2004, 08:51 AM
  4. Zip code validation
    By krwyth in forum MySQL Help
    Replies: 2
    Last Post: January 5th, 2004, 02:29 PM
  5. manually supplying form values
    By rebbit in forum PHP Development
    Replies: 9
    Last Post: January 3rd, 2004, 07:37 PM

IMN logo majestic logo threadwatch logo seochat tools logo