[liphp] need help
Venkatagiriyappa, Veena
[email protected]
Tue, 17 Jun 2003 15:33:55 -0400
Hi,
the code works now!!!But surprisingly both $_POST["cancelproposalid"] as
well as $_POST['cancelproposalid] works. Probably the old code was getting
called from the cache which was actually not taking my modified code I
think. But I am not sure. I closed the browser and opened it again...and
the code started working!!!
Thanks for your help
Veena
-----Original Message-----
From: Bhulipongsanon, Pinyo
To: '[email protected]'
Sent: 6/17/2003 3:25 PM
Subject: RE: [liphp] need help
My comment has ### in front of it.
-----Original Message-----
From: Venkatagiriyappa, Veena [mailto:[email protected]]
Sent: Tuesday, June 17, 2003 1:24 PM
To: '[email protected]'
Subject: [liphp] need help
Hi,
I have a HTML form with an input type radio button.
Code:
<form action="proposal_cancelled.php" name="cancelproposal"
method="POST">
<?
### use $num_proposals = count($proposals);, then check agains
$num_proposals, so that you do not have to evaluate count() multiple
times.
This make for better code.
for($i=0;$i<count($proposals);$i++)
{
?>
### missing </td> where I mark ***
<tr>
<td class="text"><b><input type="radio"
name="cancelproposalid" value="<?$proposals[$i]?>"> <?echo
$proposals[$i]?>: </b><?echo get_proposal_title($proposals[$i])?> ***
</tr>
<tr height="10"></tr>
<?}
?>
<tr>
<td align="center" valign="middle"><input
type="submit"
name="submit" value="Submit">
<input type="reset" name="reset" value="Reset"></td>
</tr>
</form>
### did you mispelled the actual filename?
In proposal_cacelled.php
PHP:
### use $_POST['cancelproposalid'] instead of
$_POST["cancelproposalid"].
Read somewhere that this is better. Not sure why.
<?php
echo "pid is" .$_POST["cancelproposalid"]?>
?>
gives no value. What am I doing wrong here. how do I send the proposalid
to
another page in case of radio button? Does the $_POST act different for
radio buttons which has dynamically populated data?(like in this case
proposalid)
### your code should work, unless your PHP does not support $_POST
variable.
Try other equivalent.
_______________________________________________
Liphp mailing list
[email protected]
https://www.liphp.org/mailman/listinfo/liphp
_______________________________________________
Liphp mailing list
[email protected]
https://www.liphp.org/mailman/listinfo/liphp