By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,334 Members | 2,776 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,334 IT Pros & Developers. It's quick & easy.

form problem/question

P: 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
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Stijn Goris" <me*****@hotmail.com> wrote in message
news:3f***********************@reader3.news.skynet .be...
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

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
Jul 17 '05 #2

P: n/a

"Richard Grove" <info[at]redeyemedia[dot]co[dot]uk> wrote in message
news:3f*********************@mercury.nildram.net.. .
"Stijn Goris" <me*****@hotmail.com> wrote in message
news:3f***********************@reader3.news.skynet .be...
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

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


I think I have to make numerous forms. Tanks
Jul 17 '05 #3

P: n/a
In article <3f***********************@reader3.news.skynet.be> ,
"Stijn Goris" <me*****@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.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.