Passing variable
| From: | Ohlson Stefan | Date: | Thu, 07 Sep 2000 13:33:53 +0000 |
| Subject: | Passing variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15704@lists.php.net to get a copy of this message | ||
Hi!
I'm having problems with passing a variable ($message).
When I echo it in select_items.php3 it shows the correct data.
But when I echo it in the recieving script, ordered_items.php3, it just
shows the first 2-3 letters.
Anyone an idea what I'm doing wrong?
Thanks!
//Stefan
--------------------select_items.php3-----------------------------------
<?
print "<HTML><HEAD><TITLE></TITLE></HEAD>\n";
print "<BODY bgcolor='#D6D6D6'>\n";
query= "SELECT * FROM ITEMS WHERE something" ;
$handle = ORA_LOGON("XXX/YYY@ZZZ","") OR DIE("Unable to connect to
database");
$cursor = ORA_OPEN($handle) OR DIE("Unable to open database cursor");
$j=0;
ORA_PARSE($cursor, $query) OR DIE("Unable to parse query");
ORA_EXEC($cursor) OR DIE("Unable to run query");
while(ORA_FETCH($cursor)){;
$val2 = ORA_GETCOLUMN($cursor,2);
$val1 = ORA_GETCOLUMN($cursor,1);
$val0 = ORA_GETCOLUMN($cursor,0);
$j++ ;
$message .= " $j, $val2, $val1, $val0";
} // End of while
print "<FORM METHOD='POST' ACTION='./ordered_items.php3'
TARGET='bottom'>\n";
print "<INPUT TYPE=HIDDEN NAME='items' VALUE=$message>\n";
print "</FORM>\n";
ORA_CLOSE($cursor);
ORA_LOGOFF($handle);
print "</FORM>";
print "message=$message"; //Shows 1, Dickens, Charles, A Christmas
carol, 0-00-370078-X
print "</BODY></HTML>";
?>
---------------------ordered_items.php3-------------------------------
<?
mail("xxx@xxx.xxx","Order",$items, "From: yyy@yyy.yyy");
print "<HTML><HEAD><TITLE></TITLE></HEAD><BODY
bgcolor='#D6D6D6'>";
echo "items=$items"; //Shows 1,
print "</BODY></HTML>";
?>