[Cialug] (no subject)

Jason Hill cialug@cialug.org
Thu, 3 Feb 2005 12:35:29 -0600


This is a multi-part message in MIME format.

------=_NextPart_000_001D_01C509EC.D84DDB00
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Long time listener, first time caller.

 

I'm trying to do some very dynamic form work and have run into a problem
that I don't quite know about.

 

I have information in an XML file that I use to populate the form
(checkboxes and text boxes). The names of those objects come from the
information in the XML file. Once the form is submitted I need to iterate
over all the $_POST information and update data in the XML file according to
what was checked and entered into the check/text boxes. 

 

So far I've gotten stuck on $_POST['$varname'] always being empty. ($varname
will change every iteration of a loop, so there's some nested goodness too)
Using var_dump($_POST) shows me that in fact the $varname variable is there
and even using strcmp on a string that is exactly the same as what var_dump
tells me is there doesn't work. 

 

The XML datafile changes daily, so I can't count on fields being there or
not, or being in the same place in the file. 

 

Any thoughts from the php gurus out there?

 

Thanks,

 

-Jason

 

Jason Hill

jahill@iastate.edu

 


------=_NextPart_000_001D_01C509EC.D84DDB00
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Long time listener, first time =
caller&#8230;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I&#8217;m trying to do some very dynamic form work =
and have
run into a problem that I don&#8217;t quite know =
about.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have information in an XML file that I use to =
populate the
form (checkboxes and text boxes). The names of those objects come from =
the
information in the XML file. Once the form is submitted I need to =
iterate over
all the $_POST information and update data in the XML file according to =
what
was checked and entered into the check/text boxes. =
<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>So far I&#8217;ve gotten stuck on
$_POST[&#8216;$varname&#8217;] always being empty. ($varname will change =
every
iteration of a loop, so there&#8217;s some nested goodness too) Using =
var_dump($_POST)
shows me that in fact the $varname variable is there and even using =
strcmp on a
string that is exactly the same as what var_dump tells me is there
doesn&#8217;t work. <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>The XML datafile changes daily, so I can&#8217;t =
count on
fields being there or not, or being in the same place in the file. =
<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Any thoughts from the php gurus out =
there?<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>-Jason</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Jason Hill</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><a href=3D"mailto:jahill@iastate.edu"
title=3D"mailto:jahill@iastate.edu">jahill@iastate.edu</a></span></font><=
o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>

------=_NextPart_000_001D_01C509EC.D84DDB00--