[liphp] need help

Venkatagiriyappa, Veena [email protected]
Tue, 17 Jun 2003 14:59:50 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C33501.AD0B329C
Content-Type: text/plain;
	charset="iso-8859-1"


 Hi,
The code as for as viewing is considered, works fine. It lists out the
proposalid along with the title. But when it comes to posting the data being
chosen, stops working. Initially I am not selecting any of the radio button.
When the user choses one of the proposalid to be cancelled, the proposalid
has to goto called php code which is proposal_cancelled.php in order to
delete the specific proposal row from the database. I can attach bot h the
php code for your reference.


-----Original Message-----
From: Tim Sailer
To: [email protected]
Sent: 6/17/2003 1:34 PM
Subject: Re: [liphp] need help

Just reading it quickly, it looks fine. I would resort to viewing the
source
to make sure the HTML actually is the way you expect, ie:$proposals[] is
actually populated...

Tim

On Tue, Jun 17, 2003 at 01:24:27PM -0400, Venkatagiriyappa, Veena wrote:
> Hi,
> I have a HTML form with an input type radio button.
> 
> 
> Code:
> 
> <form action="proposal_cancelled.php" name="cancelproposal"
method="POST">
>             <?
>                 for($i=0;$i<count($proposals);$i++)
>                 {
>             ?>
>                     <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>
> 
> 
> 
> In proposal_cacelled.php
> 
> PHP:
> <?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)
> 
> _______________________________________________
> Liphp mailing list
> [email protected]
> https://www.liphp.org/mailman/listinfo/liphp

-- 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<
>> Tim Sailer                       ><  Coastal Internet, Inc.
<<
>> Network and Systems Operations   ><  PO Box 726
<<
>> http://www.buoy.com              ><  Mastic, NY 11955
<<
>> [email protected]                     ><<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<
_______________________________________________
Liphp mailing list
[email protected]
https://www.liphp.org/mailman/listinfo/liphp


------_=_NextPart_000_01C33501.AD0B329C
Content-Type: application/octet-stream;
	name="cancel_proposal.php"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="cancel_proposal.php"

<?=0A=
/* This file selects all the incomplete proposals for a spcific user=0A=
and when the user selects a proposal to be cancelled, all the =
corresponding=0A=
row from proposal table will be deleted */=0A=
=0A=
/* This file will show all the proposal for a particular user */=0A=
session_start();=0A=
header("Cache-control: private");=0A=
$link =3D "http://" . $_SERVER['HTTP_HOST'];=0A=
$userid=3D$_SESSION['userid'];=0A=
=0A=
print("<html>\n");=0A=
require_once "$link/modules/begin.html";=0A=
require_once "$link/userguide/side.html";=0A=
?>=0A=
<td VALIGN=3D"top" WIDTH=3D"100%">=0A=
<table WIDTH=3D"100%" CELLPADDING=3D"0" CELLSPACING=3D"0" =
BORDER=3D"0">=0A=
<!-- BEGIN SPACER -->=0A=
	<tr>=0A=
		<td WIDTH=3D"100%"  align=3D"left" colspan=3D"3" =
class=3D"homehead">=0A=
			<br>&nbsp;&nbsp;Cancel Proposal <br clear=3D"all">=0A=
	</tr>=0A=
    <tr>=0A=
	    <td class=3D"mainline" colspan=3D4><img src=3D"/images/trans.gif" =
height=3D"1" width=3D"1" alt=3D""></td>=0A=
    </tr>=0A=
	<tr>=0A=
        <td height=3D"20" colspan=3D"4"></td>=0A=
    </tr>=0A=
<?=0A=
    include_once("proposal.php");=0A=
	$proposals=3Dget_incomplete_proposals();=0A=
	if(count($proposals)=3D=3D0)=0A=
	{?>=0A=
	<table width=3D"100%" align=3D"center">=0A=
		<?echo "There is no proposal in your account which can be cancelled =
at this time<br>\n";?>=0A=
	</table>		=0A=
	<?}=0A=
	else=0A=
	{=0A=
	?>=0A=
			<tr>=0A=
				<td height=3D"10" class=3D"text" align=3D"center" colspan=3D"4">=0A=
					<b>Please chose the proposal to be cancelled </td>=0A=
			</tr>=0A=
			<tr height=3D30></tr>=0A=
	<tr>=0A=
	<td width=3D"40"></td>=0A=
	<td>=0A=
	<table width=3D"70%" border=3D0>=0A=
		<form action=3D"proposal_cancelled.php" name=3D"cancelproposal" =
method=3D"POST">=0A=
			<?=0A=
				for($i=3D0;$i<count($proposals);$i++)=0A=
				{=0A=
			?>=0A=
					<tr>=0A=
						<td class=3D"text"><b><input type=3D"radio" =
name=3D"cancelproposalid" =
value=3D"<?$proposals[$i]?>">&nbsp;&nbsp;<?echo $proposals[$i]?>: =
</b><?echo get_proposal_title($proposals[$i])?>=0A=
					</tr>=0A=
					<tr height=3D"10"></tr>=0A=
					=0A=
				<?}=0A=
				?>=0A=
				<tr>=0A=
					<td align=3D"center" valign=3D"middle"><input type=3D"submit" =
name=3D"submit" value=3D"Submit">&nbsp;&nbsp;&nbsp;=0A=
					<input type=3D"reset" name=3D"reset" value=3D"Reset"></td>=0A=
				</tr>=0A=
=0A=
		</form>=0A=
		</table>=0A=
	</td>=0A=
	</tr>=0A=
	<?}?>=0A=
=0A=
</table>=0A=
</tr><!--closed for side -->=0A=
<? require_once "$link/modules/footers.html";?>=0A=
</body>=0A=
</html>=0A=

------_=_NextPart_000_01C33501.AD0B329C
Content-Type: application/octet-stream;
	name="proposal_cancelled.php"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="proposal_cancelled.php"

<?=0A=
/***********************************************************************=
********	=0A=
Name			: proposal_cancelled.php=0A=
Author			: Veena Venkatagiriyappa=0A=
Descrption		: =0A=
Functions called:=0A=
Date created	:=0A=
Date updated	:=0A=
************************************************************************=
*******/=0A=
$link =3D "http://$_SERVER[HTTP_HOST]";=0A=
@session_start();=0A=
header("Cache-control: private"); =0A=
?>=0A=
<html>=0A=
<head>=0A=
	<meta http-equiv=3D"Content-Language" content=3D"en-us">=0A=
	<meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Diso-8859-1">=0A=
	<title>Your email is already registered</title>=0A=
	<link REL=3DSTYLESHEET TYPE=3D"text/css" =
HREF=3D"http://student.nsls.bnl.gov/style/x6a.css">=0A=
</head>=0A=
<body BGCOLOR=3D"#FFFFFF" BACKGROUND=3D"../image/Paper01.jpg" =
LEFTMARGIN=3D"0" TOPMARGIN=3D"0" RIGHTMARGIN=3D"0" MARGINHEIGHT=3D"0" =
MARGINWIDTH=3D"0" link=3D"#787AAF" text=3D"#404040" =
vlink=3D"#669999">=0A=
	<p align=3D"center">&nbsp;</p><br>=0A=
	<p align=3D"center" class=3D"subhead">Your proposal <?echo =
$_POST["cancelproposalid"]?> is successfully cancelled</p>=0A=
	=0A=
	<?=0A=
	include_once "proposal.php";=0A=
	include_once "Sendmail.php";=0A=
	/* Delete the record from proposal which triggers the deletion of =
respective =0A=
	records in tables referencing proposal tables for the proposal =
cancelled */=0A=
	echo $_POST["cancelproposalid"];=0A=
	if(delete_proposal($proposalid))=0A=
	{=0A=
		include_once "Sendmail.php";=0A=
		    /* Send email to the user */=0A=
			    $usermailid=3Dgetuser_email();=0A=
				$mailTo =3D $usermailid;=0A=
				$msgSubject =3D "Your proposal " .$proposalid. "has been Cancelled =
";=0A=
				$msgBody =3Dgetcancelproposalmailbody($proposalid);=0A=
				$xHeaders=3D"From: [email protected]";=0A=
				echo $usermailid;=0A=
				echo "<br>\n" .$msgSubject;=0A=
				echo "<br>\n" .$msgBody;=0A=
				/*if(mail($mailTo, $msgSubject, $msgBody, $xHeaders))=0A=
				{=0A=
					return true;=0A=
				}=0A=
				else=0A=
				{=0A=
					return false;=0A=
				}*/=0A=
	}=0A=
	?>=0A=
</body>=0A=
</html>=0A=

------_=_NextPart_000_01C33501.AD0B329C--