[PHP] PHP with PDFlib installation on windows

2003-04-03 Thread Bill Hudspeth
Hello,



I am having problems getting the PDF extension to work with PHP on Windows.
I am running PHP 4.2.3 on Windows NT 4.0 using IIS as my internet server. I
have enabled the PDF extension in the php.ini file, with no apparent
success. When I try to load the page, I get an empty screen (i.e., no error
messages or undefined functions). It was my understanding that the Windows
module version of PHP had PDFLib libraries already built in. What might be
my problem?



Thanks, Bill




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Using include() or require() with PDF module

2003-03-24 Thread Bill Hudspeth
I wish to use the include() and/or the require() functions to include a
block of PHP multiple times in my file. The block contains code for
outputting PDF elements. Although other external code (functions for
example) are successfully referenced using these commands, the PHP's PDF
functions don't seem to work.

Any ideas?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] including files in PHP-pdf development

2003-03-14 Thread Bill Hudspeth
Hello,

I am developing an application that ouputs the results of a database query
to a PDF file using PHP. The only real problem I have encountered is in
trying to use the "include" and/or "require" keywords. I have a block of
code in another file that needs to called several times from my main
PDF-generating PHP file. As of yet, the standard use of include or require
doesn't seem to work:

i.e.include 'output.inc';

Any ideas on what's going on or on how I might be able to introduce my code
block multiple times into the main file?

Thanks, Bill



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ODBC connectivity

2002-10-29 Thread Bill Hudspeth
I have developed a PHP application that accesses a Microsoft Access database
through ODBC. The application works well using PHP version 4.1. I have
recently installed the newest version of PHP (4.2.3) on another machine
running NT4, and IIS 4.
Again, I am using an ODBC connection, and have given this connection the
same name, login, and password as is present in my PHP files. While the PHP
module is running fine, I cannot retrieve records from the database,
probably indicating a problem with my connectivity to the ODBC. Again, I
have made the same settings in the new ODBC entry as is present on the
development machine. Could there be a version problem with the PHP module?
Any other suggestions would be greatly appreciated.

Thanks, Bill



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Passing array to function

2002-08-13 Thread Bill Hudspeth

I am trying to write a function that builds a multiple-choice drop down
list. As such, I need to specify an array in the name attribute of the
 tag. I am trying to pass a parameter to the function which gets
used as this name attribute, but seem to be having problems with the square
brackets. In the example below, I would like to submit the $elementname
variable to a function, but can't get it to take the '[' and ']' characters.
My resultant $_POST[] variable is empty. Any hints?





HARD-CODED VERSION



echo "";

echo "$chon_group_a[1]";

echo "$chon_group_a[2]";

echo "$chon_group_a[3]";

echo "$chon_group_a[4]";

echo "";



//the $chon_group_a is a locally defined array that does not seem to be
causing any problems



DESIRED FUNCTION VERSION



$elementname="cgroup_1[]";

$elementsarray=$chon_group_a;

PrintOptionBox($elementname,$elementsarray);




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Passing PHP variables into javascript

2002-07-29 Thread Bill Hudspeth

I am having a problem passing a variable from PHP to Javascript and getting
my JS function to recognize a form element object. I am trying to use the
selection of a particular option in a dropdown menu to control the
visibility of another form control element (another select box). In other
words, when the user selects the third option in the menu named "petsubtype"
, the menu named "chonpetsub" should become visible. Similarly, if the third
option is deselected, the latter menu should once again disappear. When I
click on any of the options in the first menu (i.e., "petsubtype"), I get a
Javascript warning that says "elementname.length is null or not an object".
Any help would be greatly appreciated.



Thanks in advance, Bill



//**
***



function PetSubToggle(id, elementname, form) {



alert("Function call here successful");



for(var i=0; i









require 'dhtml_functions.inc';

require 'meteor_data_arrays.inc';



//**




$petsubname="petsubtype"; //used below to assign an name the the petsub
div id

$elementname="chonpet";  //add column for petrologic
types

$elementsarray="$chon_pet";//an associative array



echo "
"; echo "
"; echo ""; //** echo ""; echo ""; echo "
"; //** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] function definition causing problems?

2002-06-24 Thread Bill Hudspeth

I am using PHP 4.2.1, Windows 2000P, IIS4 connected to an Access 2000
database with an ISAPI module. I have created a very simple form and have
written a function to display radio buttons. While a hard-coded, HTML
version of the form works perfectly (correctly returning data), the php file
brings up an error message when I simply add the function definition at the
top of the page (whether or not the function call is present in the code
further down).



i.e.,



Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or T_NUM_STRING in
C:\inetpub\wwwroot\PHP\cat_proto3.php on line 46





Line 46 corresponds to the form tag, as follows:









The entire code is below:







  Prototype IOM Meteorite Catalog Access Site





"
: ">";

$String .= "\n";

} #end of for loop

return chop($String);

} #end of function MakeRadioButtons()




#

?>



















INSTITUTE OF METEORITICS

Prototype Meteorite Catalog Access Page







PLEASE SELECT A METEORITE CLASS:













  Chondrite

  Achondrite

  Stony Iron

  Iron

  

  















 

Meteorite Catalog Output
Results





OUTPUT_HEADER;



echo <<



Sample Name

Type



TABLEHEADER;



//connect to database

$connectionstring = odbc_connect("meteoritecatalog", "wbhk", "poitiers");



$class_query = "SELECT sample.Sample, type.type_name

FROM sample,type

WHERE sample.type = type.type

AND sample.type=$_POST[meteorite_class]

ORDER BY type.type_name";



//execute query

$queryexe = odbc_do($connectionstring, $class_query);



//query database

while(odbc_fetch_row($queryexe))

{

$msample = odbc_result($queryexe, 1);

$mtype = odbc_result($queryexe, 2);



//format results

print ("");

print ("$msample");

print ("$mtype");

print ("");

}



//disconnect from the database

odbc_close($connectionstring);



print ("");



}

?>











Many thanks for the help, Bill




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] self processing forms

2002-06-10 Thread Bill Hudspeth

I am using the O'Reilly "Programming PHP" manual, and have copied the code
from Example 7.3, p. 166. I have the magic_quotes_gpc set to ON in php.ini
(though toggling between on and off doesn't seem to have any effect). My
processed form reports "0.00F is -17.78C " regardless of the initial
fahrenheit temperature I enter. Moreover, using another version of this
script, as shown in Example 7.4, p. 167, simply clears the text field, and
never returns an output. I can't figure out why I am not getting a correct
output - perhaps something in my php.ini file? A copy of the code I am using
(Example 7.3) is as follows:




Untitled







Fahrenheit temperature:








**

Thanks much in advance, Bill





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php