× 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.



$fdname=$_POST['ppname'];

Brian May
Project Lead
Management Information Systems
Garan, Incorporated
Starkville, Mississippi

Young i Professionals
http://www.youngiprofessionals.com



"Tom Deskevich" <thomas.l.deskevich@xxxxxxxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
10/09/2009 10:29 AM
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
<web400@xxxxxxxxxxxx>
cc

Subject
[WEB400] Attempting to pass html text box into PHP to call an RPG program






All I want to do is prompt for a search name on a web page, then take
whatever is keyed in and pass it to my RPG program, which will load my
information, which I will use to populate a page of names.

I cannot get the text box information "out".

I have researched. And to my frustration, the examples out there are
"hello
world" and see how easy this is! I have hard coded all my variables and it
works great!

Here is my totally un-excellent code:

HTML to present the text box:
<html>
<head>
<link rel="stylesheet" href="styles.php" type="text/css">
<TITLE>Clerk of Courts Imaging</TITLE>
</head>
<h1 class=bigbluetext> Clerk of Courts Imaging Inquiry </h1>
<form method="post">

Primary Participant Name:
<input tabIndex="1" size="30" name="ppname">
<INPUT TYPE="submit" VALUE=" Find ">
EXAMPLE: Doe, John
<hr />
</html>

CONDITION CODE BELOW ON CLICK OF SUBMIT BUTTON.

<?php
if(isset($_POST['ppname'])){
require_once('Connection.php');
try {
$conn = new Connection();
} catch (Exception $e) {
echo "Failure to connect";
echo $e->getMessage();
die();
}
$fdname="HOW DO I GET PPNAME IN HERE??" ;
$desc = array (
array ("name"=>"caseno", "io"=>I5_INOUT, "type" => I5_TYPE_CHAR,
"length"=>
"15"),
array ("name"=>"foname", "io"=>I5_INOUT, "type" => I5_TYPE_CHAR,
"length"=>
"30"),
array ("name"=>"Vs", "io"=>I5_INOUT, "type" => I5_TYPE_CHAR, "length"=>
"1")
);
try {
$prog = i5_program_prepare("ICSCCLIB/CCP565PHPC", $desc);
} catch (Exception $e) {
echo "Failure when preparing program";
echo $e->getMessage();
die();
}
$params = array ("caseno"=>" ","foname"=>$fdname,"vs"=>"P");
$retvals = array("caseno"=>"caseno","foname"=>" ","vs"=>"vs");
$ret = i5_program_call($prog, $params, $retvals) ;

Running this, I GET "Type of parameter 1 cannot be a null
Hard coding and forcing something in $FDNAME works fine.


THANKS!!!!!!!!!! I FEEL LIKE SUCH A NULL-SKULL!!!

Tom Deskevich
Infocon Corporation
Phone 814-472-6066
Fax 814-472-5019


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.