Date: 06/18/01
- Next message: Christopher J. Bobcowski: "[phplib] csv file download... (simple newbie question?)"
- Previous message: Rogers, Paul: "[phplib] OOHForms doesn't seem to work!!"
- In reply to: Rogers, Paul: "[phplib] OOHForms doesn't seem to work!!"
- Next in thread: Rogers, Paul: "RE: [phplib] OOHForms doesn't seem to work!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Christopher J. Bobcowski: "[phplib] csv file download... (simple newbie question?)"
- Previous message: Rogers, Paul: "[phplib] OOHForms doesn't seem to work!!"
- In reply to: Rogers, Paul: "[phplib] OOHForms doesn't seem to work!!"
- Next in thread: Rogers, Paul: "RE: [phplib] OOHForms doesn't seem to work!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

