[PHP-DB] Re: Tables

2004-08-24 Thread Ustimenko Alexander
1) 5$ :)
2) It`s not for php.db list
3) May be:

class field_commander
{
var $value;
var $name;
var ...

function field_commander($label, $width, $name, ...)
{
if (isset($_POST[$this-])) {
$this-echo_input();
} else {
$this-echo_entered_result();
}
}

...

function echo_input() {
...
}

function echo_entered_result() {
...
}

...

}

Hafidz Abdullah [EMAIL PROTECTED] ???/ ? 
?: news:[EMAIL PROTECTED]
Hi everyone.

I'm new to PHP. And so I'm so keen on finding people who are willing to
share their knowledge with me.

I've generated forms containing text boxes, check boxes, text areas, drop
boxes, radio buttons  hidden fields as an HTML table with two columns, the
first for the desciption, the second, the field. I also have a final row for
the Submit button.

I also have a function which takes an array of my field_commander objects as
follows:

$fca = array(new field_commander(Yes, we would like to have our logo
featured:,40,C,,$fld_count++),
  new field_commander(Exhibiting Company
Name:,40,T,,$fld_count++),
  new field_commander(Please list our company under the
alphabet:,40,D,$a,$fld_count++));
  new field_commander(,40,R,$a,$fld_count++));


Now for the part which I have no idea as to how it can be done. When the
form is submitted, it should be processed to show a table that presents the
data as text instead of input controls. The table should be in a string -
which is then printed, i.e. do not print the parts directly.

I would very much appreciate it if you can show me some examples  furnish
me with the explanations.

Thanks  regards,
Hafidz

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



[PHP-DB] Re: tables/columns with spaces

2002-05-13 Thread James Chin

Jeffrey,

Try using quotation marks:
  select * from REQ where BUSINESS AREA = '$var'

Keep in mind that using quotation marks means that the field name is
now case sensitive.

Regards,
James
OpenLink Software Inc.
http://www.openlinksw.com

On Fri, 10 May 2002 08:41:11 -0400, [EMAIL PROTECTED] (Jeffrey
N Dyke) wrote:

Someone, in their infinite wisdom, named some, not all of course,  tables
and columns with spaces, i.e. BUSINESS AREA in a SQL server database that i
am working with.  You can run lots of queries that return fine, but when I
run a query such as select * from REQ where BUSINESS AREA = '$var', i get
an error. Which, to me is completely understandable.  I have tried using
the [BUSINESS AREA] notation, which will work on tables named with spaces,
but not field names.
I want to simply rename, and make the others adapt their code to conform.
But i wanted to try to solve this first.
Any ideas...?

Thanks,
Jeff


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