RE: [PHP] Why does this happen?

2003-02-10 Thread Ford, Mike [LSS]
 -Original Message-
 From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]]
 Sent: 09 February 2003 14:39

[OP snipped]

 I don't know much about CF, but in plain HTML as you show 
 here you have 3
 different form input (select) fields sharing the same name. Thus the
 browser will transmit only one of the three input (select) fields upon
 submit (it is undefined which field will be sent, but most 
 browsers will
 transmit the last value).

No, that's not true.  The browser will transmit them all -- it's up to
whatever's receiving the POST to decide what to do with the duplicates.
ColdFusion obviously glues them together, whereas PHP ignores all except the
last.

 form name=form1 method=post action=
 Year 
 select name=date[Y] onSelect=return check_submit() 
 option selected value=20022002/option 
 /select
 Month 
 select name=date[M] 
 option selected value=1212/option 
 /select
 Day 
 select name=date[D] 
 option selected value=2525/option 
 /select
 input type=submit name=textfield
 /form
 
 In your receiving script you would have an associative array 
 named date
 in the $_REQUEST structure:
 
 $date_received = $_REQUEST['date'];
 $year = $date_received['Y'];
 $month = $date_received['M'];
 $day = $date_received['D'];

That's one way to do it.  Personally, I'd just name the fields date_year,
date_month and date_day -- using an array here seems like unnecessary
complexity.  I'd save arrays for when I really need them -- like if I have a
multi-row form where each row has year/month/day fields.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




RE: [PHP] Why does this happen?

2003-02-10 Thread Ford, Mike [LSS]
 -Original Message-
 From: CF High [mailto:[EMAIL PROTECTED]]
 Sent: 09 February 2003 20:52
 
 Here's the deal:
 
 Let's say I have a form that requests the season schedule of 
 a baseball
 team, and the team in question has twenty scheduled games all 
 on different
 days.
 
 Each form row will have three select elements for the date; 
 i.e. date(x) for
 the year, date(x+1) for the month, and date(x+2) for the day, 
 or however
 I'll need to make each date select element unique.
 
 Then, in the insert page, I'll need to loop through each date 
 element by
 groups of three and create an array for each date set.

If I'm reading this right, you need to do something like this on your form
page:

form 
?php
   for ($i=1; $i=20; $i++):
?
  select name=date_year[?php echo $i ?]
 ...
  /select
  select name=date_month[?php echo $i ?]
 ...
  /select
 ...
?php
   endfor;
?
/form

and then your receiving page will have arrays called $_POST['date_year'],
$_POST['date_month'], etc (or the equivalent globals if you've chosen the
insecure register_globals On route).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




Re: [PHP] Why does this happen?

2003-02-10 Thread Noah
H...

So in the receiving page I'll need to string together date_year[i],
date_month[i] and date_day[i] in order to get the full date for each
scheduled game.  Which is what CF apparently glues together for the
developer on the fly.

I'll try out both this method and the array method suggested by OP (I need
practice working with arrays in PHP anyway).

Thanks for the informative reply,

--Noah


- Original Message -
From: Ford, Mike [LSS] [EMAIL PROTECTED]
To: 'CF High' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, February 10, 2003 5:28 AM
Subject: RE: [PHP] Why does this happen?


  -Original Message-
  From: CF High [mailto:[EMAIL PROTECTED]]
  Sent: 09 February 2003 20:52
 
  Here's the deal:
 
  Let's say I have a form that requests the season schedule of
  a baseball
  team, and the team in question has twenty scheduled games all
  on different
  days.
 
  Each form row will have three select elements for the date;
  i.e. date(x) for
  the year, date(x+1) for the month, and date(x+2) for the day,
  or however
  I'll need to make each date select element unique.
 
  Then, in the insert page, I'll need to loop through each date
  element by
  groups of three and create an array for each date set.

 If I'm reading this right, you need to do something like this on your form
 page:

 form 
 ?php
for ($i=1; $i=20; $i++):
 ?
   select name=date_year[?php echo $i ?]
  ...
   /select
   select name=date_month[?php echo $i ?]
  ...
   /select
  ...
 ?php
endfor;
 ?
 /form

 and then your receiving page will have arrays called $_POST['date_year'],
 $_POST['date_month'], etc (or the equivalent globals if you've chosen the
 insecure register_globals On route).

 Cheers!

 Mike

 -
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information Services,
 JG125, James Graham Building, Leeds Metropolitan University,
 Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211



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




Re: [PHP] Why does this happen?

2003-02-09 Thread Ernest E Vogelsinger
At 04:52 09.02.2003, CF High said:
[snip]
In this test form when I submit and insert into my db, only the last select
field get entered; i.e. in this case the day value of 25.

form name=form1 method=post action=

Year
select name=date onSelect=return check_submit()
option selected value=20022002/option
/select

Month
select name=date
option selected value=1212/option
/select

Day
select name=date
option selected value=2525/option
/select

input type=submit name=textfield

/form

Why does this happen?  In Cold Fusion I'm able to refer to the three selects
as #date# and it returns 20021225 as expected.
[snip] 

I don't know much about CF, but in plain HTML as you show here you have 3
different form input (select) fields sharing the same name. Thus the
browser will transmit only one of the three input (select) fields upon
submit (it is undefined which field will be sent, but most browsers will
transmit the last value).

Maybe CF fiddles around with the element names, PHP doesn't. You could e.g.
format the 3 elements to transmit an array, something like this:

form name=form1 method=post action=
Year 
select name=date[Y] onSelect=return check_submit() 
option selected value=20022002/option 
/select
Month 
select name=date[M] 
option selected value=1212/option 
/select
Day 
select name=date[D] 
option selected value=2525/option 
/select
input type=submit name=textfield
/form

In your receiving script you would have an associative array named date
in the $_REQUEST structure:

$date_received = $_REQUEST['date'];
$year = $date_received['Y'];
$month = $date_received['M'];
$day = $date_received['D'];

HTH,


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] Why does this happen?

2003-02-09 Thread CF High
Alright, alright, everyone, I could get away with this in Cold Fusion, but
not in PHP.

The simple example I gave is part of a more complex problem, however.

Here's the deal:

Let's say I have a form that requests the season schedule of a baseball
team, and the team in question has twenty scheduled games all on different
days.

Each form row will have three select elements for the date; i.e. date(x) for
the year, date(x+1) for the month, and date(x+2) for the day, or however
I'll need to make each date select element unique.

Then, in the insert page, I'll need to loop through each date element by
groups of three and create an array for each date set.

Similar to what I had to do in CF, but I could get away with naming each row
of select elements as date(x) for year, date(x) for month, date(x) for day,
etc.


My ideas might be a little primitive here, so feel free to chime in if
you've got a tighter solution

Thanks,

--Noah





John W. Holmes [EMAIL PROTECTED] wrote in message
000a01c2cfdd$5f9c5c40$7c02a8c0@coconut">news:000a01c2cfdd$5f9c5c40$7c02a8c0@coconut...
  Got a problem with I'm sure a simple solution::
 
  In this test form when I submit and insert into my db, only the last
  select
  field get entered; i.e. in this case the day value of 25.
 
  form name=form1 method=post action=
 
  Year
  select name=date onSelect=return check_submit()
  option selected value=20022002/option
  /select
 
  Month
  select name=date
  option selected value=1212/option
  /select
 
  Day
  select name=date
  option selected value=2525/option
  /select
 
  input type=submit name=textfield
 
  /form

 All of your form elements have the same name! What do you expect to
 happen?

 If you have this in PHP:

 $date = 1;
 $date = 2;
 $date = 3;

 What value do you think $date has now??

 ---John W. Holmes...

 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/





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




Re: [PHP] Why does this happen?

2003-02-09 Thread Noah
Hey Ernest.

This looks like the solution I'll need to make my CF interface work in PHP.

I'll check it out.

Thanks!

--Noah


- Original Message -
From: Ernest E Vogelsinger [EMAIL PROTECTED]
To: CF High [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, February 09, 2003 6:39 AM
Subject: Re: [PHP] Why does this happen?


 At 04:52 09.02.2003, CF High said:
 [snip]
 In this test form when I submit and insert into my db, only the last
select
 field get entered; i.e. in this case the day value of 25.
 
 form name=form1 method=post action=
 
 Year
 select name=date onSelect=return check_submit()
 option selected value=20022002/option
 /select
 
 Month
 select name=date
 option selected value=1212/option
 /select
 
 Day
 select name=date
 option selected value=2525/option
 /select
 
 input type=submit name=textfield
 
 /form
 
 Why does this happen?  In Cold Fusion I'm able to refer to the three
selects
 as #date# and it returns 20021225 as expected.
 [snip]

 I don't know much about CF, but in plain HTML as you show here you have 3
 different form input (select) fields sharing the same name. Thus the
 browser will transmit only one of the three input (select) fields upon
 submit (it is undefined which field will be sent, but most browsers will
 transmit the last value).

 Maybe CF fiddles around with the element names, PHP doesn't. You could
e.g.
 format the 3 elements to transmit an array, something like this:

 form name=form1 method=post action=
 Year
 select name=date[Y] onSelect=return check_submit()
 option selected value=20022002/option
 /select
 Month
 select name=date[M]
 option selected value=1212/option
 /select
 Day
 select name=date[D]
 option selected value=2525/option
 /select
 input type=submit name=textfield
 /form

 In your receiving script you would have an associative array named date
 in the $_REQUEST structure:

 $date_received = $_REQUEST['date'];
 $year = $date_received['Y'];
 $month = $date_received['M'];
 $day = $date_received['D'];

 HTH,


 --
O Ernest E. Vogelsinger
(\)ICQ #13394035
 ^ http://www.vogelsinger.at/




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




RE: [PHP] Why does this happen?

2003-02-08 Thread Victor
Maybe you should rename them differently/ or make then into an array?

-Original Message-
From: CF High [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 10:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Why does this happen?

Hey all.

Got a problem with I'm sure a simple solution::

In this test form when I submit and insert into my db, only the last
select
field get entered; i.e. in this case the day value of 25.

form name=form1 method=post action=

Year
select name=date onSelect=return check_submit()
option selected value=20022002/option
/select

Month
select name=date
option selected value=1212/option
/select

Day
select name=date
option selected value=2525/option
/select

input type=submit name=textfield

/form

Why does this happen?  In Cold Fusion I'm able to refer to the three
selects
as #date# and it returns 20021225 as expected.

Any ideas?

Thanks,

--Noah


--




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

__ 
Post your free ad now! http://personals.yahoo.ca

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




RE: [PHP] Why does this happen?

2003-02-08 Thread John W. Holmes
 Got a problem with I'm sure a simple solution::
 
 In this test form when I submit and insert into my db, only the last
 select
 field get entered; i.e. in this case the day value of 25.
 
 form name=form1 method=post action=
 
 Year
 select name=date onSelect=return check_submit()
 option selected value=20022002/option
 /select
 
 Month
 select name=date
 option selected value=1212/option
 /select
 
 Day
 select name=date
 option selected value=2525/option
 /select
 
 input type=submit name=textfield
 
 /form

All of your form elements have the same name! What do you expect to
happen?

If you have this in PHP:

$date = 1;
$date = 2;
$date = 3;

What value do you think $date has now??

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




Re: [PHP] Why does this happen?

2003-02-08 Thread Jason k Larson
Because all of your field names are overwriting each other until the 
last one wins.

name=date

This needs to be different for each field so PHP can assign that name as 
the variable.

HTH,
Jason k Larson


CF High wrote:
Hey all.

Got a problem with I'm sure a simple solution::

In this test form when I submit and insert into my db, only the last select
field get entered; i.e. in this case the day value of 25.

form name=form1 method=post action=

Year
select name=date onSelect=return check_submit()
option selected value=20022002/option
/select

Month
select name=date
option selected value=1212/option
/select

Day
select name=date
option selected value=2525/option
/select

input type=submit name=textfield

/form

Why does this happen?  In Cold Fusion I'm able to refer to the three selects
as #date# and it returns 20021225 as expected.

Any ideas?

Thanks,

--Noah


--




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




RE: [PHP] why does this happen?

2002-11-05 Thread Jay Blanchard
Change your body text=#FF to body text=#00 The text is set
to white.

-Original Message-
From: Karl James [mailto:karl.james;verizon.net]
Sent: Tuesday, November 05, 2002 4:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] why does this happen?


Hey guys

Im trying to print all the names in this table and
To do alternating colors, with check boxes on the last
Column

When I tried this.my site will not display any names
What so ever.
And I tried some example code for the alternating colors
But its not working the way it should

The site is
http://www.ultimatefootballleague.com/php/2002players.php
and
http://www.ultimatefootballleague.com/php/2002players.phps





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




RE: [PHP] why does this happen?

2002-11-05 Thread Jay Blanchard
[snip]
I did the changes but.
Now nonthing appears at all on the web page
Please refresh to see what im saying..
[/snip]

Now, if that was all you changed you should not have a problem, but you must
have changed more than that because now there is nothing in the page. Can
you show us your code?

[hint to get more help]
When responding to a post where someone attempts to help you make sure to
respond to the mailing list in the event the original helpful citizen went
to a meeting or the bathroom or something.
[/hint]

JB



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




RE: [PHP] why does this happen?

2002-11-05 Thread Jay Blanchard
And all you changed was the body text=#FF tag? If so, the code you
sent was before you chnaged it to body text=#00 (those are zeros)

-Original Message-
From: Karl James [mailto:karl.james;verizon.net]
Sent: Tuesday, November 05, 2002 4:35 AM
To: 'Jay Blanchard'
Subject: RE: [PHP] why does this happen?


Here is the code jay!

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
title2002 Players/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body text=#FF



?

$db = mysql_connect( 198.63.221.3 ,ultimatefootball, kjames1973 );
IF( !$db ) { echo Unable to connect to the MySQL Database; }
mysql_select_db(ultimatefootballleague);
$query = SELECT * FROM players;
$result = MYSQL_QUERY($query);
$total_rows = mysql_num_rows($result);
if (!$total_rows) {
  print HTMLBODYh1Table $name is empty/h1/BODY/HTML;
  return;
}
$row = mysql_fetch_row($result);
$total_cols = count($row);
print HTMLBODY;
print table width='100%' border='1' cellspacing='0' cellpadding='0'
align='center' td bgcolor=#0099CCfont color=#FF;
print trtd colspan=$total_cols align=center$name Table (rows:
$total_rows, column: $total_cols)/td/tr;
print tr;
$i=0;
while($i  $total_cols){
  print td;
  print $row[$i];
  print /td;
  $i++;
}
print /tr;
while($row = mysql_fetch_row ($result)) {
  $i = 0;
  print tr;
  while($i  $total_cols){
print td;
print $row[$i];
print /td;
$i++;
  }
  print /tr;
}
mysql_free_result($result);
print /TABLE/BODY/HTML;
function ShowTable($name){
  MYSQL_CONNECT($hostname, $username, $password) OR DIE(Unable to
connect);
  MYSQL_SELECT_DB($dbName) OR DIE(Unable to select database);
  $query = select * from $name;
  $result = MYSQL_QUERY($query);
  $total_rows = mysql_num_rows($result);
  if (!$total_rows) {
print HTMLBODYh1Table $name is empty/h1/BODY/HTML;
return;
  }
  $row = mysql_fetch_row($result);
  $total_cols = count($row);
  print HTMLBODY;
  print table width='100%' border='1' cellspacing='0' cellpadding='0'
align='center';
  print trtd colspan=$total_cols align=center$name Table (rows:
$total_rows, column: $total_cols)/td/tr;
  print tr;
  $i=0;
  while($i  $total_cols){
print td;
print $row[$i];
print /td;
$i++;
  }
  print /tr;
  while($row = mysql_fetch_row ($result)) {
$i = 0;
print tr;
while($i  $total_cols){
  print td;
  print $row[$i];
  print /td;
  $i++;
}
 print tdinput type=checkbox name=\opt[{$row[0]}]\/td;

print /tr;
  }
  print /TABLE/BODY/HTML;
  }
?
/body
/html

-Original Message-
From: Jay Blanchard [mailto:jay.blanchard;niicommunications.com]
Sent: Tuesday, November 05, 2002 11:32 AM
To: 'Karl James'; 'PHP General'
Subject: RE: [PHP] why does this happen?

[snip]
I did the changes but.
Now nonthing appears at all on the web page
Please refresh to see what im saying..
[/snip]

Now, if that was all you changed you should not have a problem, but you
must
have changed more than that because now there is nothing in the page.
Can
you show us your code?

[hint to get more help]
When responding to a post where someone attempts to help you make sure
to
respond to the mailing list in the event the original helpful citizen
went
to a meeting or the bathroom or something.
[/hint]

JB



--
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




RE: [PHP] why does this happen?

2002-11-05 Thread Jay Blanchard
Dude, forget colors and stuff for the moment, you just want to get the page
to display properly. You have many problems where your print statements are
concerned without going into the coat of many colors.



-Original Message-
From: Karl James [mailto:karl.james;verizon.net]
Sent: Tuesday, November 05, 2002 4:43 AM
To: 'Jay Blanchard'
Subject: RE: [PHP] why does this happen?


I changed all font codes to #33
And nothing happend

-Original Message-
From: Jay Blanchard [mailto:jay.blanchard;niicommunications.com]
Sent: Tuesday, November 05, 2002 11:39 AM
To: 'Karl James'; 'PHP General'
Subject: RE: [PHP] why does this happen?

And all you changed was the body text=#FF tag? If so, the code
you
sent was before you chnaged it to body text=#00 (those are
zeros)

-Original Message-
From: Karl James [mailto:karl.james;verizon.net]
Sent: Tuesday, November 05, 2002 4:35 AM
To: 'Jay Blanchard'
Subject: RE: [PHP] why does this happen?


Here is the code jay!

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
title2002 Players/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body text=#FF



?

$db = mysql_connect( 198.63.221.3 ,ultimatefootball, kjames1973 );
IF( !$db ) { echo Unable to connect to the MySQL Database; }
mysql_select_db(ultimatefootballleague);
$query = SELECT * FROM players;
$result = MYSQL_QUERY($query);
$total_rows = mysql_num_rows($result);
if (!$total_rows) {
  print HTMLBODYh1Table $name is empty/h1/BODY/HTML;
  return;
}
$row = mysql_fetch_row($result);
$total_cols = count($row);
print HTMLBODY;
print table width='100%' border='1' cellspacing='0' cellpadding='0'
align='center' td bgcolor=#0099CCfont color=#FF;
print trtd colspan=$total_cols align=center$name Table (rows:
$total_rows, column: $total_cols)/td/tr;
print tr;
$i=0;
while($i  $total_cols){
  print td;
  print $row[$i];
  print /td;
  $i++;
}
print /tr;
while($row = mysql_fetch_row ($result)) {
  $i = 0;
  print tr;
  while($i  $total_cols){
print td;
print $row[$i];
print /td;
$i++;
  }
  print /tr;
}
mysql_free_result($result);
print /TABLE/BODY/HTML;
function ShowTable($name){
  MYSQL_CONNECT($hostname, $username, $password) OR DIE(Unable to
connect);
  MYSQL_SELECT_DB($dbName) OR DIE(Unable to select database);
  $query = select * from $name;
  $result = MYSQL_QUERY($query);
  $total_rows = mysql_num_rows($result);
  if (!$total_rows) {
print HTMLBODYh1Table $name is empty/h1/BODY/HTML;
return;
  }
  $row = mysql_fetch_row($result);
  $total_cols = count($row);
  print HTMLBODY;
  print table width='100%' border='1' cellspacing='0' cellpadding='0'
align='center';
  print trtd colspan=$total_cols align=center$name Table (rows:
$total_rows, column: $total_cols)/td/tr;
  print tr;
  $i=0;
  while($i  $total_cols){
print td;
print $row[$i];
print /td;
$i++;
  }
  print /tr;
  while($row = mysql_fetch_row ($result)) {
$i = 0;
print tr;
while($i  $total_cols){
  print td;
  print $row[$i];
  print /td;
  $i++;
}
 print tdinput type=checkbox name=\opt[{$row[0]}]\/td;

print /tr;
  }
  print /TABLE/BODY/HTML;
  }
?
/body
/html

-Original Message-
From: Jay Blanchard [mailto:jay.blanchard;niicommunications.com]
Sent: Tuesday, November 05, 2002 11:32 AM
To: 'Karl James'; 'PHP General'
Subject: RE: [PHP] why does this happen?

[snip]
I did the changes but.
Now nonthing appears at all on the web page
Please refresh to see what im saying..
[/snip]

Now, if that was all you changed you should not have a problem, but you
must
have changed more than that because now there is nothing in the page.
Can
you show us your code?

[hint to get more help]
When responding to a post where someone attempts to help you make sure
to
respond to the mailing list in the event the original helpful citizen
went
to a meeting or the bathroom or something.
[/hint]

JB



--
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




RE: [PHP] why does this happen?

2002-11-05 Thread Jay Blanchard
Edit only the # sign and the 6 characters following it. There is a good
color reference at http://www.visibone.com/colorlab/

-Original Message-
From: Karl James [mailto:karl.james;verizon.net]
Sent: Tuesday, November 05, 2002 4:48 AM
To: 'Jay Blanchard'
Subject: RE: [PHP] why does this happen?


Jay I got it fixed...
How do I edit the font and the colors of tables and backgrounds
Go ahead and it refresh!!

-Original Message-
From: Jay Blanchard [mailto:jay.blanchard;niicommunications.com]
Sent: Tuesday, November 05, 2002 11:39 AM
To: 'Karl James'; 'PHP General'
Subject: RE: [PHP] why does this happen?

And all you changed was the body text=#FF tag? If so, the code
you
sent was before you chnaged it to body text=#00 (those are
zeros)

-Original Message-
From: Karl James [mailto:karl.james;verizon.net]
Sent: Tuesday, November 05, 2002 4:35 AM
To: 'Jay Blanchard'
Subject: RE: [PHP] why does this happen?


Here is the code jay!

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
title2002 Players/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body text=#FF



?

$db = mysql_connect( 198.63.221.3 ,ultimatefootball, kjames1973 );
IF( !$db ) { echo Unable to connect to the MySQL Database; }
mysql_select_db(ultimatefootballleague);
$query = SELECT * FROM players;
$result = MYSQL_QUERY($query);
$total_rows = mysql_num_rows($result);
if (!$total_rows) {
  print HTMLBODYh1Table $name is empty/h1/BODY/HTML;
  return;
}
$row = mysql_fetch_row($result);
$total_cols = count($row);
print HTMLBODY;
print table width='100%' border='1' cellspacing='0' cellpadding='0'
align='center' td bgcolor=#0099CCfont color=#FF;
print trtd colspan=$total_cols align=center$name Table (rows:
$total_rows, column: $total_cols)/td/tr;
print tr;
$i=0;
while($i  $total_cols){
  print td;
  print $row[$i];
  print /td;
  $i++;
}
print /tr;
while($row = mysql_fetch_row ($result)) {
  $i = 0;
  print tr;
  while($i  $total_cols){
print td;
print $row[$i];
print /td;
$i++;
  }
  print /tr;
}
mysql_free_result($result);
print /TABLE/BODY/HTML;
function ShowTable($name){
  MYSQL_CONNECT($hostname, $username, $password) OR DIE(Unable to
connect);
  MYSQL_SELECT_DB($dbName) OR DIE(Unable to select database);
  $query = select * from $name;
  $result = MYSQL_QUERY($query);
  $total_rows = mysql_num_rows($result);
  if (!$total_rows) {
print HTMLBODYh1Table $name is empty/h1/BODY/HTML;
return;
  }
  $row = mysql_fetch_row($result);
  $total_cols = count($row);
  print HTMLBODY;
  print table width='100%' border='1' cellspacing='0' cellpadding='0'
align='center';
  print trtd colspan=$total_cols align=center$name Table (rows:
$total_rows, column: $total_cols)/td/tr;
  print tr;
  $i=0;
  while($i  $total_cols){
print td;
print $row[$i];
print /td;
$i++;
  }
  print /tr;
  while($row = mysql_fetch_row ($result)) {
$i = 0;
print tr;
while($i  $total_cols){
  print td;
  print $row[$i];
  print /td;
  $i++;
}
 print tdinput type=checkbox name=\opt[{$row[0]}]\/td;

print /tr;
  }
  print /TABLE/BODY/HTML;
  }
?
/body
/html

-Original Message-
From: Jay Blanchard [mailto:jay.blanchard;niicommunications.com]
Sent: Tuesday, November 05, 2002 11:32 AM
To: 'Karl James'; 'PHP General'
Subject: RE: [PHP] why does this happen?

[snip]
I did the changes but.
Now nonthing appears at all on the web page
Please refresh to see what im saying..
[/snip]

Now, if that was all you changed you should not have a problem, but you
must
have changed more than that because now there is nothing in the page.
Can
you show us your code?

[hint to get more help]
When responding to a post where someone attempts to help you make sure
to
respond to the mailing list in the event the original helpful citizen
went
to a meeting or the bathroom or something.
[/hint]

JB



--
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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php