PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1845
Number of posts: 5013

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
array Posted by nov8998 on 6 May 2004 at 8:49 PM
hi, can somebody help me in array problem.Below is part of my coding:
<TABLE WIDTH="75%" BORDER="0" CELLSPACING="2" CELLPADDING="2">
<?PHP
for ($intBilU=1 ;$intBilU<=3;$intBilU++)
{ echo "<TR><TD WIDTH=\"40%\">University # $intBilU</TD>\n" .
"<TD WIDTH=\"60%\"><INPUT TYPE=\"text\"
NAME=\"txtUName\" SIZE=\"50\"></TD></TR>\n" .
"<TR><TD WIDTH=\"40%\">Program/Achievement</TD>\n" .
"<TD WIDTH=\"60%\"><INPUT TYPE=\"text\"
NAME=\"txtUProg\" SIZE=\"50\"></TD></TR>\n" .
"<TR><TD WIDTH=\"40%\">Graduation Year</TD>\n" .
"<TD WIDTH=\"60%\"><INPUT TYPE=\"text\"
NAME=\"txtGradYr\" SIZE=\"5\"
MAXLENGTH=\"4\"></TD></TR>\n";}
?></TABLE>
after user click button Submit, i want each value will put in array.
the coding i've done not work :
for ($intBilU=1 ;$intBilU<=3;$intBilU++)
{
$dbUName[intBilU]=Trim($_POST['txtUName']);
$dbUProg[$intBilU]=Trim($_POST['txtUProg']);
$dbUGradYr[$intBilU]=Trim($_POST['txtGradYr']);
}
the eg. output should be as below:
$dbUName[1]="A University"
$dbUProg[1]="Science"
$dbUGradYr[1]="1992"
$dbUName[2]="B University"
$dbUProg[2]="art"
$dbUGradYr[2]="1999"
hope can help me plzzzzzzzzzz...


Report
Re: array Posted by Johnny13 on 7 May 2004 at 3:23 AM
I dont see a Submit button in your code,it seems your Form is incomplete..Read
http://programmersheaven.com/c/MsgBoard/read.asp?Board=33&MsgID=251391 for an example.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.