[PHP] Table format needs php correction

2003-08-30 Thread Gloria L. McMillan
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 table\n;
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
 print \ttr\n;
 foreach ($line as $col_value) {
  print \t\ttd$col_value/td\n;
 }
 print \t/tr\n;
}
print /table\n;
*/
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
 printf(
div class=\colorfield\
table
 trthDate/ththName/ththCourse/ththUnit/th\n

trtd%s/tdtd%s/tdtd%s/tdtd%s/td/tr\n

 trth = colspan = 4 Q1 /th\n
 trtd%s/td\n

 trth = colspan = 4 Q2 /th\n
 trtd%s/td\n

 trth = colspan = 4 Q3 /th\n
 trtd%s/td\n

 trth = colspan = 4 Q4 /th\n
 trtd%s/td\n

 trthQ5/ththQ6/ththQ7/th\n

 trtd%s/tdtd%s/tdtd%s/td\n
/table


/div\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);

?
/body
/html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Table format needs php correction

2003-08-30 Thread Gloria L. McMillan
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

2003-08-30 Thread Gloria L. McMillan
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



[PHP] Need help om screen display error

2003-08-23 Thread Gloria L. McMillan
Hi, all!

I have a working database at:
http://dakotacom.net/~glomc/forms/CAT.html

It does send info to the database, but only shows   [  at the upper left of screen
when it is supposed to print to screen.

Could somebody help me find what is wrong in my .php file?  Thanks,

Gloria



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Need help on screen display error

2003-08-23 Thread Gloria L. McMillan
I see a couple have tried my poll.

Please ask and I will send that php file...

Gloria


Gloria L. McMillan wrote:

 Hi, all!

 I have a working database at:
 http://dakotacom.net/~glomc/forms/CAT.html

 It does send info to the database, but only shows   [  at the upper left of screen
 when it is supposed to print to screen.

 Could somebody help me find what is wrong in my .php file?  Thanks,

 Gloria

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Tips on print to screen debugging

2003-08-23 Thread Gloria L. McMillan
I have always had problems in cutting and pasting new forms off old ones.
Often the problem is in the communication that makes the form allow repliers
to view results on screen.  This is good to do with opinion polls to start
discussions.

I have a *terrible* time locating the source of the error.

Do experienced .php users have a method for finding errors in the print
to screen?

I will send the culprit .php file to anybody who is willing to look it over.

Thanks,

Gloria McMillan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Tips on print to screen debugging

2003-08-23 Thread Gloria L. McMillan
Here is the URL of the poll form.
http://dakotacom.net/~glomc/forms/CAT.html

When you do this poll it immiediately attempts to print to screen.
There's also a VIEW RESPONSES button so ppl don't have to
answer the poll to view reponses.  You can see now that there
is just a little jumble of letters at upper left of the screen.

Something is wrong in the .php file.

One member of this group gave a working routine to me to
choose among three select calls for the display.  Maybe that has
been corrupted by losing a letter or something.  I cut and paste
new forms off the old.

I am willing to send the .php file backchannel.  I have deleted the personal
addresses from it.
Thanks,

Gloria

John W. Holmes wrote:

 Gloria L. McMillan wrote:

  I have always had problems in cutting and pasting new forms off old ones.
  Often the problem is in the communication that makes the form allow repliers
  to view results on screen.  This is good to do with opinion polls to start
  discussions.
 
  I have a *terrible* time locating the source of the error.
 
  Do experienced .php users have a method for finding errors in the print
  to screen?
 
  I will send the culprit .php file to anybody who is willing to look it over.

 This is a pretty vague question. Provide some more detail as to the
 exact problem that you're having, post a bit of the relavant file, and
 the exact error message. :)

 --
 ---John Holmes...

 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

 PHP|Architect: A magazine for PHP Professionals – www.phparch.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Tips on print to screen debugging

2003-08-23 Thread Gloria L. McMillan
One other thing I noticed:

If you click source code, you get the input replies and the formatting.
None of it shows on screen where I want it, though.

Gloria


Gloria L. McMillan wrote:

 Here is the URL of the poll form.
 http://dakotacom.net/~glomc/forms/CAT.html

 When you do this poll it immiediately attempts to print to screen.
 There's also a VIEW RESPONSES button so ppl don't have to
 answer the poll to view reponses.  You can see now that there
 is just a little jumble of letters at upper left of the screen.

 Something is wrong in the .php file.

 One member of this group gave a working routine to me to
 choose among three select calls for the display.  Maybe that has
 been corrupted by losing a letter or something.  I cut and paste
 new forms off the old.

 I am willing to send the .php file backchannel.  I have deleted the personal
 addresses from it.
 Thanks,

 Gloria

 John W. Holmes wrote:

  Gloria L. McMillan wrote:
 
   I have always had problems in cutting and pasting new forms off old ones.
   Often the problem is in the communication that makes the form allow repliers
   to view results on screen.  This is good to do with opinion polls to start
   discussions.
  
   I have a *terrible* time locating the source of the error.
  
   Do experienced .php users have a method for finding errors in the print
   to screen?
  
   I will send the culprit .php file to anybody who is willing to look it over.
 
  This is a pretty vague question. Provide some more detail as to the
  exact problem that you're having, post a bit of the relavant file, and
  the exact error message. :)
 
  --
  ---John Holmes...
 
  Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
 
  PHP|Architect: A magazine for PHP Professionals – www.phparch.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Help on showing results on screen

2003-06-06 Thread Gloria L. McMillan
Someone who knows php helped me to put together this code to show resulty screen.

There were about 30 items on the working model.

I tried to modify it to showing the Date and only the long comment item q40.

But all that gets shown is:  ]  (this symbol)

Here is my HTML code in the Adj03.php file.
I have been wracking my brain and any help is much appreciated!!

gloria
---

/* Printing results in HTML */

---
/* COMMENTED 2002-05-02
print table\n;
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
 print \ttr\n;
 foreach ($line as $col_value) {
  print \t\ttd$col_value/td\n;
 }
 print \t/tr\n;
}
print /table\n;
*/
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
 printf(
div class=\colorfield\
table

 trthDate/ththQ40/th/tr\n

 trtd%s/tdtd%s/td/tr

/table

/div
br /
br /\n,
   $row['added'],
   $row['q40']);

}

/* Free resultset */

 mysql_free_result($result);

/* Close the database connection */

mysql_close($link);

?


/body
/html


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Need help with display of results

2003-06-06 Thread Gloria L. McMillan
Hi, again!

I did not see my question as yet so I will repost it.

I have had help writing HTML code to display the results of my PHP-- McSQL actions.

But when I attempt to show the DATE and q40 (comments) with the HTML code below,
all I see on screen is:   ]in the upper left corner.

URL:  http://DakotaCom.net/~glomc/forms/Adj03.html  (A poll on part-time faculty)

Here's the code for the display that is not working...
But the ] may refer to earlier code in this long php file.
I did not send the whole file, only the HTML part.

/* Printing results in HTML */


/* COMMENTED 2002-05-02
print table\n;
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
 print \ttr\n;
 foreach ($line as $col_value) {
  print \t\ttd$col_value/td\n;
 }
 print \t/tr\n;
}
print /table\n;
*/
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
 printf(
div class=\colorfield\
table
 trthDATE/ththCOMMENTS/th/tr\n

 trtd%s/tdtd%s/td/tr

/table

/div
br /
br /\n,
   $row['added']);
   $row['q40']);

}

/* Free resultset */

 mysql_free_result($result);


/* Close the database connection */

mysql_close($link);

?


/body
/html


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Need help with display of results

2003-06-06 Thread Gloria L. McMillan
I will send my whole php file to anybpody willing to help me display this one long 
answer
question.
Some previous helpers added some stuff that isn't being used, but I don't know how to 
get
rid of it.

Gloria


Gloria L. McMillan wrote:

 Hi, again!

 I did not see my question as yet so I will repost it.

 I have had help writing HTML code to display the results of my PHP-- McSQL actions.

 But when I attempt to show the DATE and q40 (comments) with the HTML code below,
 all I see on screen is:   ]in the upper left corner.

 URL:  http://DakotaCom.net/~glomc/forms/Adj03.html  (A poll on part-time faculty)

 Here's the code for the display that is not working...
 But the ] may refer to earlier code in this long php file.
 I did not send the whole file, only the HTML part.

 /* Printing results in HTML */

 /* COMMENTED 2002-05-02
 print table\n;
 while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
  print \ttr\n;
  foreach ($line as $col_value) {
   print \t\ttd$col_value/td\n;
  }
  print \t/tr\n;
 }
 print /table\n;
 */
 while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
  printf(
 div class=\colorfield\
 table
  trthDATE/ththCOMMENTS/th/tr\n

  trtd%s/tdtd%s/td/tr

 /table

 /div
 br /
 br /\n,
$row['added']);
$row['q40']);

 }

 /* Free resultset */

  mysql_free_result($result);

 /* Close the database connection */

 mysql_close($link);

 ?

 /body
 /html


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problem Display of data

2003-06-06 Thread Gloria L. McMillan
Hi, again.

I got one suggestion but it did not work for displaying the results from a 40 item 
poll.

I only want to display item 40: long answer.

My php is cluttered with somebody's select routine that I am not using.

Here is that poll:  http://DakotaCom.net/~glomc/forms/Adj03.html

All I get from the call to the Adj03.php file is the single symbol of:   ]

I will be happy to exchange help for proofreading since I am a college instructor of
writing.

Thanks,

Gloria McMillan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php