Re: [PHP] Posting a variable

2007-04-12 Thread Otto Wyss
Richard Lynch wrote: On Wed, April 11, 2007 12:53 pm, [EMAIL PROTECTED] wrote: Quoting Robert Cummings <[EMAIL PROTECTED]>: mysql_fetch_row()? It's a religious question. I find mysql_fetch_assoc to be less clear because you end up not necessarily using the data until much later, and by the

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 22:10 -0500, Richard Lynch wrote: > On Wed, April 11, 2007 9:58 pm, Robert Cummings wrote: > > I see it as two different things being matched up in a clear > unequivocal manner, to make self-documenting code. I'm all for self-documenting code, that's why I don't in practice e

Re: [PHP] Posting a variable

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 9:58 pm, Robert Cummings wrote: > The table fields should have been named well enough in the first > place. Some are not fields at all, but calculations, and, yes, I'll have an " AS foo" in my SQL (only not really foo, of course) simply for documentation purposes, even thoug

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 21:30 -0500, Richard Lynch wrote: > On Wed, April 11, 2007 8:17 pm, Robert Cummings wrote: > > I'd rather lose track of $row['foozie'] than $row[1]. Either way, if > > your code is structured well, the row data should be in close > > proximity > > to it's use. At the very leas

Re: [PHP] Posting a variable

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 8:17 pm, Robert Cummings wrote: > I'd rather lose track of $row['foozie'] than $row[1]. Either way, if > your code is structured well, the row data should be in close > proximity > to it's use. At the very least, if your field names are informative > instead of 'foozie', mayb

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 20:12 -0500, Richard Lynch wrote: > On Wed, April 11, 2007 12:53 pm, [EMAIL PROTECTED] wrote: > > Quoting Robert Cummings <[EMAIL PROTECTED]>: > > > >> On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: > >> > 1- your mysql query statement is better to have a WHERE pa

Re: [PHP] Posting a variable

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 12:53 pm, [EMAIL PROTECTED] wrote: > Quoting Robert Cummings <[EMAIL PROTECTED]>: > >> On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: >> > 1- your mysql query statement is better to have a WHERE part too. >> > 2- I would use mysql_fetch_row instead of mysql_fetch

Re: [PHP] Posting a variable

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 11:21 am, Zhimmy Kanata wrote: > echo "$username"; > echo "$username02"; Copy/paste these two lines *EVERYWHERE* in your script that you can find: $username = or $username02 = -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 10:53 -0700, [EMAIL PROTECTED] wrote: > Quoting Robert Cummings <[EMAIL PROTECTED]>: > > > On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: > > > 1- your mysql query statement is better to have a WHERE part too. > > > 2- I would use mysql_fetch_row instead of mysql

Re: [PHP] Posting a variable

2007-04-11 Thread Richard Davey
[EMAIL PROTECTED] wrote: Quoting Robert Cummings <[EMAIL PROTECTED]>: On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: 1- your mysql query statement is better to have a WHERE part too. 2- I would use mysql_fetch_row instead of mysql_fetch_assoc Ummm, why would you want to reduce c

Re: [PHP] Posting a variable

2007-04-11 Thread Jochem Maas
Robert Cummings wrote: > On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: >> 1- your mysql query statement is better to have a WHERE part too. >> 2- I would use mysql_fetch_row instead of mysql_fetch_assoc > > Ummm, why would you want to reduce clarity and maintainability by using > mys

Re: [PHP] Posting a variable

2007-04-11 Thread siavash1979
Quoting Robert Cummings <[EMAIL PROTECTED]>: > On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: > > 1- your mysql query statement is better to have a WHERE part too. > > 2- I would use mysql_fetch_row instead of mysql_fetch_assoc > > Ummm, why would you want to reduce clarity and maint

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: > 1- your mysql query statement is better to have a WHERE part too. > 2- I would use mysql_fetch_row instead of mysql_fetch_assoc Ummm, why would you want to reduce clarity and maintainability by using mysql_fetch_row()? Cheers, Rob. --

Re: [PHP] Posting a variable

2007-04-11 Thread siavash1979
1- your mysql query statement is better to have a WHERE part too. 2- I would use mysql_fetch_row instead of mysql_fetch_assoc 3- in your form, you're using a single quote. anything in between single quotes will be printed as is. you need to close your single quote and print username and open anot

[PHP] Posting a variable

2007-04-11 Thread Zhimmy Kanata
Hi, I am trying to pass a variable into a textfield and then pass the variable onto a php page for insertion into a Mysql database. However, I want to send the username of the person logging on. But instead php is taking the username of the logon information of the database. Which I