Connecting Tech Pros Worldwide Help | Site Map

form problem/question

  #1  
Old July 17th, 2005, 02:08 AM
Stijn Goris
Guest
 
Posts: n/a
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


  #2  
Old July 17th, 2005, 02:08 AM
Richard Grove
Guest
 
Posts: n/a

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


  #3  
Old July 17th, 2005, 02:08 AM
Stijn Goris
Guest
 
Posts: n/a

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


  #4  
Old July 17th, 2005, 02:09 AM
Warren Oates
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataBase and form problem Totti answers 2 November 4th, 2008 12:15 PM
Simple Page Template with Form Problem 42 answers 0 November 18th, 2005 01:13 AM
GDI Onpaint Problem/Question in Custom control Sagaert Johan answers 11 November 15th, 2005 01:24 PM
form problem Krista answers 3 July 17th, 2005 03:07 AM