Re: [phplib] OOHForms doesn't seem to work!! From: Jesse Swensen (swensenj <email protected>)
Date: 06/20/01

You can try:

print $db->Record['str_Surname']

-- 
Jesse Swensen
swensenj <email protected>

> From: "Rogers, Paul" <Paul.Rogers <email protected>> > Date: Wed, 20 Jun 2001 08:45:58 +0100 > To: "'Philippe Paravicini'" <quietsky <email protected>>, > "'phplib'"<phplib <email protected>> > Subject: RE: [phplib] OOHForms doesn't seem to work!! > > Hi Philipe > > Many thanks for your suggestion. > > It tried altering the print statement to > > print "$db->Record['str_Surname']; > > However I now get > > Array['str_Surname'] > > Any suggestions? > > Paul > -----Original Message----- > From: Philippe Paravicini [mailto:quietsky <email protected>] > Sent: 18 June 2001 22:43 > To: Rogers, Paul; 'phplib' > Subject: RE: [phplib] OOHForms doesn't seem to work!! > > > Assuming that str_Surname is the name of a field in your database, and that > $db->Record is an Array, try: > > $surname = $db->Record["str_Surname"]; (missing quotes in your statement?) > print $surname; > > or > > print "$db->Record['str_Surname']; > > also, technically you don't need the "" in $db->query("$str_sql"); although > they are not hurting. > > > > -----Original Message----- > From: Rogers, Paul [mailto:Paul.Rogers <email protected>] > Sent: Monday, June 18, 2001 9:14 AM > To: 'phplib' > Subject: [phplib] OOHForms doesn't seem to work!! > > > Dear All > > Can any one help? > I am trying to produce a form using OOHForms. The following code produces > the correct output from the $t->show result($db) but both the print > "$db->Record[str_Surname]"; statement and the OOHForms output only produce > the following: > > Array[str_Surname] > > Can anyone explain to me what I'm doing wrong?? > > Paul > > > <?php // personnel_records_update.php > > // Use the global keyword to let this function > // access variables that have web-page scope. > // > // global $db, $arr_request; > > // Declare some variables as global so information > // can be easily passed from this function to > // the web page. > // > // global $key; > > // $key = $arr_request['key']; > $key = 105; > > $str_sql = " > select > * from mlm_personnel_personal > where > id = 105 > "; > > $db = new DB_Mowlem; > > $db->query("$str_sql"); > print "$db->Record[str_Surname]"; > > include("table.inc"); // requires include_path to be functioning > include("table_Oracle.inc"); // requires include_path to be functioning > include("common.inc"); // requires include_path to be functioning > > $t = new OracleTable; > // $t->heading = "off"; > $t->show_result($db); > > print "$db->Record[str_Surname]"; > > require("oohforms.inc"); > $f = new form; > > $f->add_element(array("type"=>"text", > "name"=>"str_Surname", > "valid_regex"=>"^[a-z]*$", > "valid_e"=>"Letters Only", > "icase"=>0, > "value"=>"$db->Record[str_surname]")); > > $f->start(); > $f->show_element("str_Surname"); > $f->finish(); > ?> > > > **************************************************************************** > * > This email and any attachments transmitted with it are confidential > and intended solely for the use of the individual or entity to whom > they are addressed. If you have received this email in error please > notify the sender and do not store, copy or disclose the content > to any other person. > > It is the responsibility of the recipient to ensure that opening this > message and/or any of its attachments will not adversely affect > its systems. No responsibility is accepted by the Company. > **************************************************************************** > * > > --------------------------------------------------------------------- > To unsubscribe, e-mail: phplib-unsubscribe <email protected> > For additional commands, e-mail: phplib-help <email protected> > > > ***************************************************************************** > This email and any attachments transmitted with it are confidential > and intended solely for the use of the individual or entity to whom > they are addressed. If you have received this email in error please > notify the sender and do not store, copy or disclose the content > to any other person. > > It is the responsibility of the recipient to ensure that opening this > message and/or any of its attachments will not adversely affect > its systems. No responsibility is accepted by the Company. > ***************************************************************************** >

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>