form problem/question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stijn Goris

    form problem/question

    hi all,

    I m facing a problem with a form containing multiple buttons. Is there a way
    I can go to another url for each button or is the form tag responsible for
    the url?

    kind regards
    Stijn


  • Richard Grove

    #2
    Re: form problem/question

    "Stijn Goris" <mepisto@hotmai l.com> wrote in message
    news:3fb4f6ee$0 $10550$ba620e4c @reader3.news.s kynet.be...[color=blue]
    > hi all,
    >
    > I m facing a problem with a form containing multiple buttons. Is there a[/color]
    way[color=blue]
    > I can go to another url for each button or is the form tag responsible for
    > the url?
    >
    > kind regards
    > Stijn
    >
    >[/color]


    The forms action is responsible for where the data is sent.
    You could of course do new form tags for each button.

    Regards
    Richard Grove
    01892 546979

    http://shopbuilder.org - ecommerce systems
    Become a Shop Builder re-seller:
    Affiliate marketing is a simple way to earn money online, using our affiliate platform. Join a global community of publishers and advertisers.

    Affiliate marketing is a simple way to earn money online, using our affiliate platform. Join a global community of publishers and advertisers.



    Comment

    • Stijn Goris

      #3
      Re: form problem/question


      "Richard Grove" <info[at]redeyemedia[dot]co[dot]uk> wrote in message
      news:3fb4fe47$0 $108$65c69314@m ercury.nildram. net...[color=blue]
      > "Stijn Goris" <mepisto@hotmai l.com> wrote in message
      > news:3fb4f6ee$0 $10550$ba620e4c @reader3.news.s kynet.be...[color=green]
      > > hi all,
      > >
      > > I m facing a problem with a form containing multiple buttons. Is there a[/color]
      > way[color=green]
      > > I can go to another url for each button or is the form tag responsible[/color][/color]
      for[color=blue][color=green]
      > > the url?
      > >
      > > kind regards
      > > Stijn
      > >
      > >[/color]
      >
      >
      > The forms action is responsible for where the data is sent.
      > You could of course do new form tags for each button.
      >
      > Regards
      > Richard Grove
      > 01892 546979
      >
      > http://shopbuilder.org - ecommerce systems
      > Become a Shop Builder re-seller:
      > http://www.affiliatewindow.com/affil...ls.php?mid=611
      > http://www.affiliatewindow.com/a.pl?590
      >
      >[/color]

      I think I have to make numerous forms. Tanks


      Comment

      • Warren Oates

        #4
        Re: form problem/question

        In article <3fb4f6ee$0$105 50$ba620e4c@rea der3.news.skyne t.be>,
        "Stijn Goris" <mepisto@hotmai l.com> wrote:

        :hi all,
        :
        :I m facing a problem with a form containing multiple buttons. Is there a way
        :I can go to another url for each button or is the form tag responsible for
        :the url?
        :
        :kind regards
        :Stijn

        This is truncated, prob'ly not very elegant,and some of the error
        checking is missing, and I should prob'ly be using isset(); but I have
        two buttons and one text input:

        <form action="<?php echo($PHP_SELF) ;?>">
        <div>
        <input type="text" name="ipAdd" />
        <input type="submit" name="del_ip" value="del" />
        <input type="submit" name="get_host" value="host" />
        </div>
        </form>

        <?php
        ipAdd = trim($ipAdd);

        if ("del" == $del_ip) {
        $del = mysql_query("de lete from pageStats where ipAdd = '$ipAdd'")
        or die ("Delete failed: " . mysql_error());
        echo mysql_affected_ rows() . "&nbsp;hits deleted.";
        }

        if ("host" == $get_host) {
        echo gethostbyaddr($ ipAdd);
        }
        ?>

        .... and obviously the cleanup code is missing.
        --
        Looks like more of Texas to me.
        .... Arizona, where the nights are warm and the roads are straight.

        Comment

        Working...