[PHP] Formatting text output
Hello friends. I work for a school where we need to put the class results on to our web, one for every class. We enter the marks in the database and this should be displayed in a particular varying format as follows(an example) : Grade A Pass : 4554 7687 9834 2354 7671 Grade B Pass : 0045 7612 2297 Failed : 3104 6509 0286 8765 2229 0978 How can I put this in Mysql and get the same test formatting out? If the grade types where standard and limited, it was okay. But the grades types can increase or decrease. How can I maintain the same formatting as what I input? Thanks very much Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error in variable when looping
Hello friends, I have made the following table of data and a button on every row to view the details. The code is working fine and the table is displayed with the buttons. The problem I have is that the $SelectedItemNumber posted to the next page remains the same number no matter which row button I click. I have my relevant code below. Please help me. I know I am making a mistake somewhere but I cannot figure out where. Quote : while($row=mysql_fetch_array($result)){ Print " "; Print "" ; Print " $row[OrgName] "; print " "; Print "" ; Print $row[OrgCountry]; print " "; Print "" ; Print $row[OrgNumber]; print " "; Print "" ; Print $row[Orgaddress]; print " "; Print "" ; Print $row[OrgChief]; print " "; Print "" ; Print""; print ""; Print"";} } ?> Unquote Thanks Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error in variable when looping
Sorry Rick. Thanks. I could not understand your question. Are you asking for more of the code? I did not include that as I thought it would be too long in the mail. Thanks Denis --- Rick Emery <[EMAIL PROTECTED]> wrote: > so where is $rowe set? > > Show us code that calls this page > - Original Message - > From: "menezesd" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, January 13, 2003 6:21 PM > Subject: [PHP] Error in variable when looping > > > Hello friends, > > I have made the following table of data and a button on every row to > view the details. The code is > working fine and the table is displayed with the buttons. > > The problem I have is that the $SelectedItemNumber posted to the > next page remains the same number > no matter which row button I click. I have my relevant code below. > Please help me. I know I am > making a mistake somewhere but I cannot figure out where. > > Quote : > > > while($row=mysql_fetch_array($result)){ > > Print " "; > Print " bgcolor=\"#bf\"> color=\"#00\">" ; > Print " $row[OrgName] > "; > print " "; > Print " bgcolor=\"#bf\"> face=\"Tahoma\" color=\"#00\">" ; > Print $row[OrgCountry]; > print " "; > Print " bgcolor=\"#bf\"> face=\"Tahoma\" color=\"#00\">" ; > Print $row[OrgNumber]; > print " "; > Print " bgcolor=\"#bf\"> face=\"Tahoma\" color=\"#00\">" ; > Print $row[Orgaddress]; > print " "; > Print " bgcolor=\"#bf\"> face=\"Tahoma\" color=\"#00\">" ; > Print $row[OrgChief]; > print " "; > Print " bgcolor=\"#b7b700\"> face=\"Tahoma\" color=\"#00\">" ; > Print" Name=\"Details\">"; > print ""; > Print" $row[Id]"; > Print "";} > } > ?> > > > > Unquote > > Thanks > Denis > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Calendar problem
Hello friends. I have two fields in my form. When two dates are entered in these two boxes, I need to find the diiference in calendar months and remaining days between these two dates. This "Calendar months and remaining days" is important. The functions that I know do not work for calendar months. Can anyone help me and tell me how this could be achieved and are there any PHP functions to do this? best regards Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need some help please
Hello Friends. I know I am asking for too much. But somehow, I am stuck with three books I am refering and still not being able to solve my problem, which I would greatly appreciate if any of you gurus can assist. The problem is as follows : I have three sections in this mail : 1. My table structure 2. My test.html file whose ACTION is testphp1.php file 3. My testphp1.php file. The problem is that I keep getting the error "error adding rows" as the rows are not adding in the database. My table structure : Table name : news Fields : newsid INT(11) title carchar(100) author varchar(40) posted INT(11) body MEDIUMTEXT My test.htm file : == Untitled Document My testphp1.php file : == Untitled Document -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php