Connecting Tech Pros Worldwide Forums | Help | Site Map

form problem/question

Stijn Goris
Guest
 
Posts: n/a
#1: Jul 17 '05
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
Guest
 
Posts: n/a
#2: Jul 17 '05

re: form problem/question


"Stijn Goris" <mepisto@hotmail.com> wrote in message
news:3fb4f6ee$0$10550$ba620e4c@reader3.news.skynet .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:
http://www.affiliatewindow.com/affil...ls.php?mid=611
http://www.affiliatewindow.com/a.pl?590


Stijn Goris
Guest
 
Posts: n/a
#3: Jul 17 '05

re: form problem/question



"Richard Grove" <info[at]redeyemedia[dot]co[dot]uk> wrote in message
news:3fb4fe47$0$108$65c69314@mercury.nildram.net.. .[color=blue]
> "Stijn Goris" <mepisto@hotmail.com> wrote in message
> news:3fb4f6ee$0$10550$ba620e4c@reader3.news.skynet .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


Warren Oates
Guest
 
Posts: n/a
#4: Jul 17 '05

re: form problem/question


In article <3fb4f6ee$0$10550$ba620e4c@reader3.news.skynet.be> ,
"Stijn Goris" <mepisto@hotmail.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("delete 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.
Closed Thread