×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Two things:
(1) Variable names are case sensitive, so $ret is not the same thing as $RET.
(2) You may not have everything set up properly to read the data area.
Task 1: Get the variable to show up on the page in html tags.
<?php
$ret = "this is a test";
echo "<h2 class=bigbluetext> $ret </h2>";
?>
Task 2: Populate the variable by reading the data area.
You can test whether or not you are actually reading the data area with something like this:
$ret = i5_data_area_read("smpxxlib/so01p", 1, 40);
if (!$ret) echo "Did not read data area. <br>";
Have you established a connection to the iSeries? You have to connect to the iSeries before you can execute the i5 commands (like i5_data_area_read).
Are you sure the i5_COMD service is running? You may have to go to the Zend core menu and start the i5_COMD service.
Kelly
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Grizzly Malchow
Sent: Thursday, February 04, 2010 9:52 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Help trying to display a PHP variable within HTML tags
I can't tell by what you posted, but are you requiring Connection.php and creating the connection prior to using i5_data_area_read in the section code that doesn't work?
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Tom Deskevich
Sent: Thursday, February 04, 2010 9:45 AM
To: 'Web Enabling the AS400 / iSeries'
Subject: [WEB400] Help trying to display a PHP variable within HTML tags
Did not make any difference
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Grizzly Malchow
Sent: Thursday, February 04, 2010 10:30 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Help trying to display a PHP variable within HTML tags
Change this
echo "<H2 class=bigbluetext> $RET </h2>";
to
echo "<H2 class=bigbluetext> $ret </h2>";
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Tom Deskevich
Sent: Thursday, February 04, 2010 9:18 AM
To: 'Web Enabling the AS400 / iSeries'
Subject: [WEB400] Help trying to display a PHP variable within HTML tags
I want to display a PHP variable on the top of my page with my headings. I
have searched on the internet, and have not found a way to show the php
variable within my html tags. If I use text in the heading, it works. But
when using a variable, nothing shows. I have tried many variations. I know
there is something in the data area, because it works if I move it to my
main body of php code.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.