Re: [PHP] Table format needs php correction
* Thus wrote Gloria L. McMillan ([EMAIL PROTECTED]): > This is all so advanced. Is it ready to be in place of the table HTML that I > already have? > Yes it should be. I hope it isn't so advanced that you can't understand what exactly I'm doing. That would rather defeat the purpose of me writing that up. > I copied it to word and saved it as a .txt file. IN IE it looked better than in my > Netscape. My appologies for that, I havn't tested the site in mozilla/netscape yet, only IE and opera. I'm actually downloading mozilla right now. HTH, Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Table format needs php correction
This is all so advanced. Is it ready to be in place of the table HTML that I already have? I copied it to word and saved it as a .txt file. IN IE it looked better than in my Netscape. Gloria Curt Zirzow wrote: > * Thus wrote Curt Zirzow ([EMAIL PROTECTED]): > > * Thus wrote Gloria L. McMillan ([EMAIL PROTECTED]): > > > Hi! > > > > Hello Gloria, > > > > > > > > This is a problem of the table formatting on a form in MySQL and PHP. > > > It may be in the HTML table code. > > > ... > > > Here is the URL to view PHP HTML table as it appears on screen: > > > http://DakotaCom.net/~glomc/forms/CAT.php > > > > I think you need to take a step back for a moment. First consider > > how you want the data to be presented in html, then the php code > > will be very simple. > > Ok, I had a little extra time this morning :) > > http://zirzow.dyndns.org/html/php/html/table.php > > Curt > -- > "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Table format needs php correction
Thanks but the lines are all running together in that URL. I don't know why. They are not breaking at the end of each line. Could you re-save a different way? Maybe send to me as a text file? Thanks, Gloria Curt Zirzow wrote: > * Thus wrote Curt Zirzow ([EMAIL PROTECTED]): > > * Thus wrote Gloria L. McMillan ([EMAIL PROTECTED]): > > > Hi! > > > > Hello Gloria, > > > > > > > > This is a problem of the table formatting on a form in MySQL and PHP. > > > It may be in the HTML table code. > > > ... > > > Here is the URL to view PHP HTML table as it appears on screen: > > > http://DakotaCom.net/~glomc/forms/CAT.php > > > > I think you need to take a step back for a moment. First consider > > how you want the data to be presented in html, then the php code > > will be very simple. > > Ok, I had a little extra time this morning :) > > http://zirzow.dyndns.org/html/php/html/table.php > > Curt > -- > "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Table format needs php correction
* Thus wrote Curt Zirzow ([EMAIL PROTECTED]): > * Thus wrote Gloria L. McMillan ([EMAIL PROTECTED]): > > Hi! > > Hello Gloria, > > > > > This is a problem of the table formatting on a form in MySQL and PHP. > > It may be in the HTML table code. > > ... > > Here is the URL to view PHP HTML table as it appears on screen: > > http://DakotaCom.net/~glomc/forms/CAT.php > > I think you need to take a step back for a moment. First consider > how you want the data to be presented in html, then the php code > will be very simple. Ok, I had a little extra time this morning :) http://zirzow.dyndns.org/html/php/html/table.php Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Table format needs php correction
On Sat, 30 Aug 2003 10:23:49 -0700 "Gloria L. McMillan" <[EMAIL PROTECTED]> wrote: > Hi! > > This is a problem of the table formatting on a form in MySQL and PHP. > It may be in the HTML table code. > > The problem is one that must be frequent. I have a mixture of one > character and long fill-in text items. > > My table now looks awkward. Somebody gave me a complex table that puts > colors as backgrounds behind the headers. Could that be the problem? > -Gloria The SQL has nothing to do with it (though make sure the query returns what you expect), it's just how you format the table with the data you have. My advice is to start it simple with no colors or stuff like that and work on it until you get the proper table (html). Forget about using other people's code in something like this and try to understand the logic before you get to beautifying your output. I just spent the last couple of days with tables formating, css, etc > > > Here is the URL to view PHP HTML table as it appears on screen: > http://DakotaCom.net/~glomc/forms/CAT.php > > Here is the mysql create table structure file: > > # > # Table structure for table 'CAT' > # > > CREATE TABLE CAT ( >id int(10) unsigned DEFAULT '0' NOT NULL auto_increment, >added datetime DEFAULT '-00-00 00:00:00' NOT NULL, >name varchar(50) NOT NULL, >course varchar(50) NOT NULL, >unit varchar(50) NOT NULL, >q1 text NOT NULL, >q2 text NOT NULL, >q3 text NOT NULL, >q4 text NOT NULL, >q5 varchar(10) NOT NULL, >q6 varchar(10) NOT NULL, >q7 varchar(10) NOT NULL, >PRIMARY KEY (id) > ); > > > Here is the table HTML part of the PHP file: > > print "\n"; > while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { > print "\t\n"; > foreach ($line as $col_value) { > print "\t\t$col_value\n"; > } > print "\t\n"; > } > print "\n"; > */ > while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { > printf(" > > > DateNameCourseUnit\n > > %s%s%s%s\n > > Q1 \n > %s\n > > Q2 \n > %s\n > > Q3 \n > %s\n > > Q4 \n > %s\n > > Q5Q6Q7\n > > %s%s%s\n > > > > \n", >$row['added'], >$row['name'], >$row['course'], >$row['unit'], >$row['q1'], >$row['q2'], >$row['q3'], >$row['q4'], >$row['q5'], >$row['q6'], >$row['q7']); > > } > > /* Free resultset */ > mysql_free_result($result); > > /* Close the database connection */ > mysql_close($link); > > ?> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- Regards, Andu Novac -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Table format needs php correction
* Thus wrote Gloria L. McMillan ([EMAIL PROTECTED]): > Hi! Hello Gloria, > > This is a problem of the table formatting on a form in MySQL and PHP. > It may be in the HTML table code. > ... > Here is the URL to view PHP HTML table as it appears on screen: > http://DakotaCom.net/~glomc/forms/CAT.php I think you need to take a step back for a moment. First consider how you want the data to be presented in html, then the php code will be very simple. >From what I see and how I would prefer to set the layout would be something like this: Date Name Course Unit Aug 30 2003 Gloria WRT 102 Fall 03 Essay 1 Q1 data for q1 Q2 data for q2 ... Then easily put that into a html table structure: DateNameCourseUnit Aug 30 2003Gloria WRT 102 Fall 03Essay 1 Q1data for q1 Q2data for q2 ... Now inside your fetch_array loop just use that template above using php variables instead of text and table column attributes in the appropriate places will result in a decent looking site. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Table format needs php correction
Hi! This is a problem of the table formatting on a form in MySQL and PHP. It may be in the HTML table code. The problem is one that must be frequent. I have a mixture of one character and long fill-in text items. My table now looks awkward. Somebody gave me a complex table that puts colors as backgrounds behind the headers. Could that be the problem? -Gloria Here is the URL to view PHP HTML table as it appears on screen: http://DakotaCom.net/~glomc/forms/CAT.php Here is the mysql create table structure file: # # Table structure for table 'CAT' # CREATE TABLE CAT ( id int(10) unsigned DEFAULT '0' NOT NULL auto_increment, added datetime DEFAULT '-00-00 00:00:00' NOT NULL, name varchar(50) NOT NULL, course varchar(50) NOT NULL, unit varchar(50) NOT NULL, q1 text NOT NULL, q2 text NOT NULL, q3 text NOT NULL, q4 text NOT NULL, q5 varchar(10) NOT NULL, q6 varchar(10) NOT NULL, q7 varchar(10) NOT NULL, PRIMARY KEY (id) ); Here is the table HTML part of the PHP file: print "\n"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { print "\t\n"; foreach ($line as $col_value) { print "\t\t$col_value\n"; } print "\t\n"; } print "\n"; */ while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { printf(" DateNameCourseUnit\n %s%s%s%s\n Q1 \n %s\n Q2 \n %s\n Q3 \n %s\n Q4 \n %s\n Q5Q6Q7\n %s%s%s\n \n", $row['added'], $row['name'], $row['course'], $row['unit'], $row['q1'], $row['q2'], $row['q3'], $row['q4'], $row['q5'], $row['q6'], $row['q7']); } /* Free resultset */ mysql_free_result($result); /* Close the database connection */ mysql_close($link); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php