Connecting Tech Pros Worldwide Help | Site Map

form problem/question

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 01:08 AM
Stijn Goris
Guest
 
Posts: n/a
Default 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



  #2  
Old July 17th, 2005, 01:08 AM
Richard Grove
Guest
 
Posts: n/a
Default 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, 01:08 AM
Stijn Goris
Guest
 
Posts: n/a
Default 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, 01:09 AM
Warren Oates
Guest
 
Posts: n/a
Default 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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.