#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Beijing,China
    Posts
    17
    Rep Power
    0
    I desiged a from containing some checkboxs. I will do two actions on the selected item.The problem is this two action are executed by two defferent php pages which both need the form's value?
    how can i do?
    Can a form contains two action hrefs?
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <<
    The problem is this two action are executed by two defferent php pages which both need the form's value?
    how can i do?
    Can a form contains two action hrefs?
    >>


    No,you can't have more than one action hrefs.

    but you can achive this.you have many options to do this.

    my suggestion is that create a frame page with php and pass this variable to both the php pages.

    you may try something like:

    <?
    echo "<frameset rows='100%' cols='145,*' frameborder=0 border=0 framespacing=0>";
    echo "<frame name='wmailmain'
    src='yourfirstpage.php?variable=$variable'
    marginheight=1 marginwidth=10>";

    echo "<frame name='wmailmain'
    src='secondpage.php?variable=$variable'
    marginheight=1 marginwidth=10>";

    echo "</frameset>";
    ?>




    ------------------
    SR -
    webshiju.com
    www.jobxyz.com-IT Career Portal
    ezipindia.com--WebStudio


    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Indonesia
    Posts
    87
    Rep Power
    15
    Why don't you mix both pages as one page.
    You can give a validation there !!

    ex :
    if ($var == var1)
    {


    } else {


    }

    etc .

    ------------------
    ** It's the world of Oscario **
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Beijing,China
    Posts
    17
    Rep Power
    0
    Thank u !
    I found the solution. :cool;
    my form is:
    <form action="do.php3" mehtod=post>
    .. many checkboxes
    <input type=image name=btn1 src="btn1.gif">
    <input type=image name=btn2 src="btn2.gif">
    </form>

    so in do.php3
    if(HTTP_POST_VARS[btn1_x]!=)
    { ..
    echo "u press image btn1 ";
    }
    else
    {..
    echo "u press image btn2.";
    }


Similar Threads

  1. double action in form
    By dynasty in forum HTML Programming
    Replies: 1
    Last Post: February 3rd, 2004, 07:41 PM
  2. Double action form
    By dynasty in forum PHP Development
    Replies: 0
    Last Post: February 3rd, 2004, 03:22 PM
  3. jsp - multiple action in a HTML form?
    By martinwtp in forum Java Help
    Replies: 3
    Last Post: February 1st, 2004, 11:49 PM
  4. HTTP Error 400: Bad Request, with basic form
    By crackwombat in forum PHP Development
    Replies: 1
    Last Post: January 23rd, 2004, 07:40 PM
  5. form action problem
    By speedamp in forum PHP Development
    Replies: 5
    Last Post: December 6th, 2003, 09:49 AM

IMN logo majestic logo threadwatch logo seochat tools logo