Hi,

Please don't post HTML mails in the group.  Post mails only in Plain text 
format.

Regards,

Vinod.



On Friday 21 March 2003 02:17 pm, you wrote:
> <html><div style='background-color:'><DIV>
> <P><BR><BR></P></DIV>
> <DIV></DIV>
> <P>Hi Deepali,</P>
> <P>To retrive the value of $txt_name use following code:</P>
> <P>$tp = ${$txt_name};</P>
> <P>where $tp will have the value </P>
> <P>Some how i feel that rather than using variable names like this it would
> be better if ou'd use arrays .</P> <P>There is this very good article at <A
> href="http://www.devshed.com";>www.devshed.com</A> on variable variables in
> php ( the one we are using here $$ )</P> <DIV>For <STRONG>Optimal Solution
> Providers </STRONG></DIV>
> <DIV></DIV>
> <DIV>&nbsp;</DIV>
> <DIV></DIV>
> <DIV><STRONG></STRONG></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <P><STRONG>T. Srinivas</STRONG></P>
> <P>&gt;From: Deepali Naik <[EMAIL PROTECTED]></P>
> <DIV></DIV>&gt;Reply-To: [EMAIL PROTECTED]
> <DIV></DIV>&gt;To: [EMAIL PROTECTED]
> <DIV></DIV>&gt;Subject: [ILUG-BOM] PHP help needed!!!!!!
> <DIV></DIV>&gt;Date: Fri, 21 Mar 2003 10:27:07 +0600 (IST)
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;Hello,
> <DIV></DIV>&gt;i m new in the PHP area... i have one doubt on PHP... can u
> help me to solve this doubt? <DIV></DIV>&gt;
> <DIV></DIV>&gt;in my code i m slecting first name and last name of users
> who are not deleted..... so this number may be anything,...
> <DIV></DIV>&gt;so i have kept a counter for that.. to know how many users
> are there?.. <DIV></DIV>&gt;now in the while loop i m displying the first
> and last name and also a text box to wewrite reason to delete user...
> <DIV></DIV>&gt;the input type text name i m generating... like re1, re2,
> re3 <DIV></DIV>&gt;
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;****************// php code
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;echo \"
> <TABLE>\\n\";
> <DIV></DIV>&gt;for ($counter=1;$counter&lt;=11;$counter++)
> <DIV></DIV>&gt;{
> <DIV></DIV>&gt;// the below function searches in the db &amp; returns the
> designation of user... <DIV></DIV>&gt; $desg= disp_desg($counter);
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;/// query to slect the user who is not deletd and of above
> desgination...,. <DIV></DIV>&gt;
> <DIV></DIV>&gt; $res [EMAIL PROTECTED](\"select fname,lname from user_details
> where code =$counter and act_flag!=\'X\' and act_flag !=\'DE\' \");
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;/// as many number of user
> <DIV></DIV>&gt;
> <DIV></DIV>&gt; while ( $row [EMAIL PROTECTED]($res))
> <DIV></DIV>&gt; {
> <DIV></DIV>&gt; if ($counter_chk==1){
> <DIV></DIV>&gt; echo \"
> <P align=left><B><U><FONT face='\\\"Bookman' size='\\\"3\\\"' Style\\\?
> Old>$desg</FONT></B></U></P>\\n\"; }#end of if <DIV></DIV>&gt;
> <DIV></DIV>&gt;// BELOW LINE GENERATE THE INPUT TYPE TEXT NAME LIKE re1..
> re2.. etc... <DIV></DIV>&gt; $txt_name=\"re\".$counter_chk;
> <DIV></DIV>&gt; $fname=$row[fname];
> <DIV></DIV>&gt; $lname=$row[lname];
> <DIV></DIV>&gt; echo \"
> <TBODY>
> <TR>
> <TD>$fname \".\" \".\"$lname </TD>
> <TD><INPUT name='\\\"$txt_name\\\"' size='\\\"45\\\"' type='\\\"text\\\"'>
> </TD></TR>\\n\"; <DIV></DIV>&gt; $counter_chk++;
> <DIV></DIV>&gt; }#end of while
> <DIV></DIV>&gt;}#end of for
> <DIV></DIV>&gt;?&gt;
> <DIV></DIV>&gt;</TBODY></TABLE>
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;***************// end of php code
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;till here it works fine...
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;now my problem is i don;t know the bnames of the input type
> text box... <DIV></DIV>&gt;i want to check that the text box is empty or
> not... but since i have generated text box name... asnd not hardcoded.. i m
> not getting how to get the data inside the text box... <DIV></DIV>&gt;
> <DIV></DIV>&gt;i have cterated a fiollowing funtion where i want to delete
> a user where the reson text box is not empty <DIV></DIV>&gt;
> <DIV></DIV>&gt;********************* php code
> <DIV></DIV>&gt;// counter_chk = no of users displayed oin the page
> <DIV></DIV>&gt;function delete_user($counter_chk)
> <DIV></DIV>&gt;{
> <DIV></DIV>&gt;$count=$counter_chk;
> <DIV></DIV>&gt;while ($count &gt;= 1)
> <DIV></DIV>&gt;{
> <DIV></DIV>&gt; in this while i want to check that the input tuype text box
> is empty or not <DIV></DIV>&gt;if not empty i want to update my table with
> the text in the input type of textbox... <DIV></DIV>&gt;but i don;t know
> how to retrieve the value of the text box.... <DIV></DIV>&gt;
> <DIV></DIV>&gt; $txt_name=\"re\".$count;
> <DIV></DIV>&gt; echo \"$txt_name\";
> <DIV></DIV>&gt; $count--;
> <DIV></DIV>&gt;}#end of while
> <DIV></DIV>&gt;}
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;********************** end of php code
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;what shd i do?.. is their any way to solve the prob...
> <DIV></DIV>&gt;ort can u suggest me some other way..?..
> <DIV></DIV>&gt;thanks in advance...
> <DIV></DIV>&gt;waiting for ur reply...
> <DIV></DIV>&gt;Deepali
> <DIV></DIV>&gt;-------------------------------------------------
> <DIV></DIV>&gt;Sify Mail - now with Anti-virus protection powered by Trend
> Micro, USA. <DIV></DIV>&gt;Know more at http://mail.sify.com
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;Sify Power mail- a Premium Service from Sify Mail!
> <DIV></DIV>&gt;know more at http://mail.sify.com
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;--
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;
> <DIV></DIV>&gt;http://mm.ilug-bom.org.in/mailman/listinfo/linuxers
> <DIV></DIV></div><br clear=all><hr>Cricket - World Cup 2003 <a
> href="http://g.msn.com/8HMHENIN/2734";>News, Views and Match Reports.</a>
> </html>

-- 


http://mm.ilug-bom.org.in/mailman/listinfo/linuxers

Reply via email to