[PHP] Download file

2001-08-01 Thread Karl J. Stubsjoen

GlacierHello,
I have script which initiates a download of a file to the client machine.  I
am using following headers followed by a ReadFile (everything is working
fine):

=code snippet==
header (Content-type: application/tar);
header(Content-Length: $len);
header (Content-Disposition: attachment; filename=download.tar);

readfile($filename);
===end code snippet=

What I need to do, is specify the default directory for this file to be
saved to.  Does anyone know how to do this?

Thanks.


Karl J. Stubsjoen
www.iexcelinlife.com
[EMAIL PROTECTED]
Phone:  602.447




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Download file

2001-08-01 Thread Karl J. Stubsjoen

Errr... it from ASP (shoot)
are you 100% sure?

-Original Message-
From: Owen Rudge [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 1:12 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Download file


 What I need to do, is specify the default directory for this file to be
 saved to.  Does anyone know how to do this?

It's just not possible.

--
Owen Rudge
http://www.owenrudge.co.uk/
http://www.gamearchive.uk.tt/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Directories Files

2001-07-31 Thread Karl J. Stubsjoen

GlacierI need to do a few things with files... 1 of them being to iterate
through a directory and display each file.  How do you do this?


Karl J. Stubsjoen
www.iexcelinlife.com
[EMAIL PROTECTED]
Phone:  602.447




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Zip mulitple files for download

2001-07-31 Thread Karl J. Stubsjoen

GlacierHello,
I need to zip multiple files into 1 zip file for download.  Which function
do I use to accomplish this?
Thanks!


Karl J. Stubsjoen
www.iexcelinlife.com
[EMAIL PROTECTED]
Phone:  602.447




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Readline and/or split by line break

2001-07-31 Thread Karl J. Stubsjoen

GlacierHello,
I'm reading a file into memory and I'd like to split each of the individual
lines into an array.  How would I do this?
Thanks,

Karl J. Stubsjoen
www.iexcelinlife.com
[EMAIL PROTECTED]
Phone:  602.447




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Pie Charts Bar Charts Line Charts...

2001-06-19 Thread Karl J. Stubsjoen

Hey Guys,

Anyone have any good starting points for delivering charts on the web?

Thanks a bunch.


Karl J. Stubsjoen
www.iexcelinlife.com
[EMAIL PROTECTED]
Phone:  602.447



[PHP] Environment Variables

2001-05-09 Thread Karl J. Stubsjoen

BlankHello,

I need to look up in the PHP online reference other variables similar to
$DOCUMENT_ROOT.  I can't find them.  Anyone know where to find them at?

Thank you,


Karl J. Stubsjoen
www.excelir.com/worldshop



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Fw: Netscape 4.0 Double Loads my Page

2001-05-01 Thread Karl J. Stubsjoen

Originally posted at an HTML newsgroup, but no response : (
Anyone here have any suggestions on the following problem?

 Hello All,

 Anyone have any ideas why Netscape 4.0 would be double refreshing my
pages?
 This also occurs, this double refresh, when the page loads for the first
 time.  It almost appears as if it:  loads the page, then refreshes.

 ...oh, and then all of my awesome Java Script is disabled!
 (no problems in IE though)

 Help Plz!

 Karl




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Add commas to 1188889 so-- 1,188,889

2001-03-19 Thread Karl J. Stubsjoen

Hello,

Has anyone written a nifty little function to add commas to big numbers
like:
119 so-- 1,188,889

If so, please share!

Karl



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Tell me if this works

2001-03-08 Thread Karl J. Stubsjoen

I'm using the SetTimeOut function of JavaScript to refresh an image every 3
seconds.  The SRC for the image is a PHP page which constructs a valid image
with some text added to the image and returns the image to the colling
Image.  This works fine, however the information should be changing every so
often for the image.  The value to display in the image is a value being
fetched from a table, that value is changing all the time.  The value is set
to the first-time-through value and then subsequent request of the image
remain all the same (the image should be changing and it isn't).

Is this a Javascript issue, browser issue, cache issue???
I've tested it on a couple of different platforms, with no luck.  Here is my
JavaScript code:

function GetStat() {
 var Image2
 Image2 = new Image(185,39)
 Image2.src = "GetStat.php"
 document.stat1.src = Image2
 setTimeout('GetStat()',3000)
  status = " "
}

img name="stat1" src="images/NumberDisplay.png" border=0

Thanks for the help!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Tell me if this works

2001-03-08 Thread Karl J. Stubsjoen

never mind... 'or - i fixed my own problem!  i enabled cacheing on both PHP
pages, the page with the image who's source calls the PHP page that creates
the image.


- Original Message -
From: "Karl J. Stubsjoen" [EMAIL PROTECTED]
To: "PHP Mailing List" [EMAIL PROTECTED]
Sent: Thursday, March 08, 2001 12:52 PM
Subject: [PHP] Tell me if this works


 I'm using the SetTimeOut function of JavaScript to refresh an image every
3
 seconds.  The SRC for the image is a PHP page which constructs a valid
image
 with some text added to the image and returns the image to the colling
 Image.  This works fine, however the information should be changing every
so
 often for the image.  The value to display in the image is a value being
 fetched from a table, that value is changing all the time.  The value is
set
 to the first-time-through value and then subsequent request of the image
 remain all the same (the image should be changing and it isn't).

 Is this a Javascript issue, browser issue, cache issue???
 I've tested it on a couple of different platforms, with no luck.  Here is
my
 JavaScript code:

 function GetStat() {
  var Image2
  Image2 = new Image(185,39)
  Image2.src = "GetStat.php"
  document.stat1.src = Image2
  setTimeout('GetStat()',3000)
   status = " "
 }

 img name="stat1" src="images/NumberDisplay.png" border=0

 Thanks for the help!


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Remote Scripting

2001-03-07 Thread Karl J. Stubsjoen

Hello,

I'm interested in the technology "Remote Scripting".  Basically, I would
like to deliver "real-time" information to a browser without having to
reload the page.

Is anyone familiar with this?

Thanks,

Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Set ODBC Timeout Value

2001-03-06 Thread Karl J. Stubsjoen

Is there a way to set the timeout value for an ODBC connection, lets say for
script trying to query a table which is locked?  Right now, the default
timeout value is well over1 minute, and I don't think I can change it
anywhere else (meaning:  I don't the the Network Administrator is going to
change it).

Thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Return Image for PHP Link

2001-02-27 Thread Karl J. Stubsjoen

Hello,

I'd like the source of an image tag to point to PHP code.  I'd like that PHP
code to generate an image (accordingly) and print/output the results back to
the calling image.  So:

img src="myphpcode.php"

Where, myphpcode.php returns a valid image.
I've done this before, but it is not fresh in my brain.

Any help would be appreciated!

Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Enumerate files in a folder

2001-02-26 Thread Karl J. Stubsjoen

Hello,

I need a little help getting started with my project (i'm new to PHP).  I
need to enumerate all of the files in a folder, their name mostly.  How
would I do that?

Thank you!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] AS400 Insert - The answer

2001-02-21 Thread Karl J. Stubsjoen

Okay,

To insert data into an AS400 system (proven on Ver 4.4) you must first:

Begin Journaling for the the file to insert into

This is done by issuing the following command at the command prompt:

STRJRNPF FILE(lib/file) JRN(jrnllib/jrnlfile)

(where test is your libs and files)

Let me know how it goes!

Karl 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Insert AS400 - We figured it out!

2001-02-16 Thread Karl J. Stubsjoen

Hello All,

Sometime later today, I will share with all of you how to perform inserts
from PHP using the DB2 Universal Connection into an AS400 Table.  Yes, we
figured it out!

Look for my post by end of day (Friday).

Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Help with session

2001-02-15 Thread Karl J. Stubsjoen

I have 2 functions on my page, RegisterUser, IsValidUser.
RegisterUser looks in the querystring to see if you've passed a certain key
 value.   If you have it populates a session variable called "ValidUser"
with a 1.
All that IsValidUser does, is check to see if the session variable
"ValidUser" is a 1 or not.

It doesn't work.
RegisterUser (which sets session variables) is taking place before headers
are written to the browser.  I'm not gettin errors, but the problem is that
ValidUser isn't able to read the session variable for some reason.

Any Ideas?

Here is the code for these 2 functions:

function IsValidUser()
{
global $HTTP_SESSION_VARS;

$reslt = 0;

  if (isset($HTTP_SESSION_VARS["ValidUser"]))
   {
if ($HTTP_SESSION_VARS["ValidUser"] == "1")
 $reslt = 1;
  }
  print("ValidUser? " . $HTTP_SESSION_VARS["ValidUser"] . "br");

return($reslt);
}


function RegisterUser()
{
global $HTTP_SESSION_VARS;
global $HTTP_GET_VARS;
$reslt = 0;

if (isset($HTTP_SESSION_VARS["ValidUser"]))
{
 if ($HTTP_SESSION_VARS["ValidUser"] == 1)
 {
   $reslt = 1;
 }
}

if ($reslt=0);
{

 $Val_User = $HTTP_GET_VARS["fis"];

 if ($Val_User == "1")
 {
  $reslt = 1;
 if (!isset($HTTP_SESSION_VARS["ValidUser"]))
 {
session_start();
 session_register("ValidUser");
 $HTTP_SESSION_VARS["ValidUser"] = 1;
}
else
{
 $HTTP_SESSION_VARS["ValidUser"] = 1;
}
 }
 else
 {
 $reslt = 0;
 }
}
return($reslt);
}



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] @ Scope

2001-02-14 Thread Karl J. Stubsjoen

When you @ "at" a command (supress error messaging) within a function, is
the scope of the @ within the function?

Example:


CloseODBC(1);

# is error message supressed here too?


function CloseODBC($connection_id)
{
# error messaging supressed
@odbc_close($connection_id);

}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Closing Databases

2001-02-14 Thread Karl J. Stubsjoen

I am making ODBC connections and MySQL connections, and want to make sure
I'm closing my connection properly.  Someone once replied that you do not
need to worry about terminating the query set (for MySQL), that PHP takes
care of this for you, is this true for the ODBC connection as well?

So what I am doing, is making a connection to the db, querying the db using
select statements, and then releasing the db connection with:  mysql_close
or odbc_close.  Is that good enough?

Thanks!

Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Return ODBC Results to an array

2001-02-13 Thread Karl J. Stubsjoen

Is there a way to return the results of a query straight into an array?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Insert Data AS400

2001-02-09 Thread Karl J. Stubsjoen

Richard,
 If that doesn't help, just start throwing out columns.  Or throw them all
 out and build it up 1 column at a time) until you find out which one it
 doesn't like.

I have gone as far as creating a single table with a single alpa field.  No
luck there either.  It gives me the exact same error.

 PS  Am I to assume you actually have a working PHP-AS400 connection?  If
 you could build a PHP/AS400 page, you would probably get much traffic.
 People keep asking about AS400, and I've never even seen one.

I am succesfully selecting data from the AS400.  But no insert yet.  Haven't
tried creating tables or anything else beyond that.

Karl
*end of my reply*

- Original Message -
From: "Richard Lynch" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 08, 2001 8:21 PM
Subject: Re: [PHP] Insert Data AS400


  I'm having troubles inserting records into our AS400.  I've tried just
 about
  every combination I can think of when trying to insert a record, but
 nothing
  is working.  Here is the most recent error I keep getting:
 
  Warning: SQL error: [IBM][CLI Driver][AS] SQL7008N REXX variable
"WBO230P
 "
  contains inconsistent data. SQLSTATE=55019 , SQL state 55019 in
SQLExecute
 
  And here is the SQL command:
  INSERT INTO WEBTEST.wbo230p (WOSTS, WOORD, WOCUS, WOST, WSNAM, WSAD1,
 WSAD2,
  WSADX, WSAD3, WSSTA, WSZIP, WOPO, WODTTM, WONORD, WINVDT, WPHONE,
WEMAIL,
  WSBSTA, WSAMT) VALUES ('1',01,01,0001,'t ','t ','t ','t ','t
  ','t ','t ','t ',01,'t ','t ','t ','t ','t ','t ')

 Like, unless AS400/IBM/CLI/AS SQL is way different from SQL92, you either
 don't need WEBTEST, or there should be no .wbo230p, or you aren't telling
us
 that you are doing something funky like trying to insert into one database
 (WEBTEST) even though you are connected to another...

 But, even so, WEBTEST.wbo230p maybe be fine, and it's just one of those
 columns whose data it doesn't like.

 The question, of course, is which one.

 The leading 0's on WOORD and WOCUS and [mumble] look pretty darned
 suspicious to me.  If those are integer, they should just be 1, not
01.
 If they are *not* integer, you need apostrophes on them just like the
 others.

 If that doesn't help, just start throwing out columns.  Or throw them all
 out and build it up 1 column at a time) until you find out which one it
 doesn't like.

 I dunno why SQL engines are so darned non-specific in their error
messages.
 My favorite:
 syntax error near ','
 Thanks guys!  Like what non-trivial SQL statement *doesn't* have a
bazillion
 commas in it?!

 PS  Am I to assume you actually have a working PHP-AS400 connection?  If
 you could build a PHP/AS400 page, you would probably get much traffic.
 People keep asking about AS400, and I've never even seen one.

 --
 Visit the Zend Store at http://www.zend.com/store/
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Insert Data AS400

2001-02-08 Thread Karl J. Stubsjoen

Help!  (if you can).

I'm having troubles inserting records into our AS400.  I've tried just about
every combination I can think of when trying to insert a record, but nothing
is working.  Here is the most recent error I keep getting:

Warning: SQL error: [IBM][CLI Driver][AS] SQL7008N REXX variable "WBO230P "
contains inconsistent data. SQLSTATE=55019 , SQL state 55019 in SQLExecute

And here is the SQL command:
INSERT INTO WEBTEST.wbo230p (WOSTS, WOORD, WOCUS, WOST, WSNAM, WSAD1, WSAD2,
WSADX, WSAD3, WSSTA, WSZIP, WOPO, WODTTM, WONORD, WINVDT, WPHONE, WEMAIL,
WSBSTA, WSAMT) VALUES ('1',01,01,0001,'t ','t ','t ','t ','t
','t ','t ','t ',01,'t ','t ','t ','t ','t ','t ')


Any Ideas why this isn't working?

Thanks!  Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Save to Local Disk

2001-02-06 Thread Karl J. Stubsjoen

Hello,

I'd like to give the user an option to "Save to Disk" the contents of a text
area.  Any ideas how to do this?

Thanks!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] AS400 SQL Errors and Resources

2001-02-05 Thread Karl J. Stubsjoen

Hello,

I reallize that the SQL syntax should be similar among all DB's which allow
SQL, but there are slight differences amongst them.  With that said, I have
written an SQL statement to the AS400 and am getting errors back.  So, and I
don't have ANY, I need a site to visit where I can reference DB2 and SQL for
the AS400.
Here is my error code:

SQL error: [IBM][CLI Driver][AS] SQL0401N The data types of the operands for
the operation "= " are not compatible. SQLSTATE=42818 , SQL state 42818 in
SQLExecDirect

Any ideas?
Was this Off-Topic?
Any suggestions where I could post these questions?

Thanks guys!

Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How to reference global variables in strings

2001-02-05 Thread Karl J. Stubsjoen

If you don't prefix a global variable with $ then how can you interpit a
global variable within a string?  AS IN:

define ("MY_PATH", "/home/me/");

print("This is My Path:  MY_PATH or is it?");


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Why sprintf for query?

2001-02-01 Thread Karl J. Stubsjoen

Sprintf formats strings and numbers to a specific format (correct?) then why
is this

$q = SPRINTF("SELECT prodnum, childdesc FROM prodaval");

like that?  Why SPRINTF in this case?  We are calling a MySQL table, is it
specific to calling a MySQL table or is this required for all calls to a
DB... or (simply) could it be written like this

$q = "SELECT prodnum, childdesc FROM prodaval";

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Tab character

2001-02-01 Thread Karl J. Stubsjoen

Is this a tab character \t


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Include quotes inside textbox

2001-02-01 Thread Karl J. Stubsjoen

Hello,

I'm trying to pass back a link to the user in a textbox (so they can copy
and paste it elsewhere), however my textbox is being parsed incorrectly by
the browser because of the " quotes which happen in the link I'm passing -
basically the HTML for the text box is getting parsed together with the HTML
for the passed link and  the results are messed up.

How do you pass quotes to a textbox?

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] htmlspecialchars Problem

2001-02-01 Thread Karl J. Stubsjoen

When I perform thi function:
$new = htmlspecialchars("a href='test'Test/a", ENT_QUOTES);

I get the following error:

Warning: Wrong parameter count for htmlspecialchars() in
utility/HTMLFormObjects1-1.php on line 135


Anyone know why?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Why?? SPRINTF(SELECT sequence,prodnum,childdesc....);

2001-02-01 Thread Karl J. Stubsjoen

What is the purpose of the SPRINTF in this instance?


SPRINTF("SELECT
equence,prodnum,childdesc,onhand,openorders,avlallocate,bakorder,webpricing
FROM prodaval");


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HowTo: IBM DB2 w/PHP

2001-01-31 Thread Karl J. Stubsjoen

We are running AS400 4.4 and PHP4, not sure what version of Linux we are
running.

- Original Message -
From: "Antonio S. Martins Jr." [EMAIL PROTECTED]
To: "Karl J. Stubsjoen" [EMAIL PROTECTED]
Cc: "PHP Mailing List" [EMAIL PROTECTED]
Sent: Wednesday, January 31, 2001 3:23 AM
Subject: Re: [PHP] HowTo: IBM DB2 w/PHP


 On Tue, 30 Jan 2001, Karl J. Stubsjoen wrote:

  We have succesfully installed the IBM DB2 RDMS on our Linux box and have
  successfully made a connection to our AS400.  All through command line
  though.

 What are the versions of your AS400 and DB2 for Linux? I had tryied to
 connect on an AS400 some time ago without success (both from Linux and
 AIX)! And from what I read on that time I tought the only way to connect
 to an AS400 is from windows!


  I am new to PHP, and am wondering:
  How do I instantiate the IBM DB2 in PHP, call commands, run queries,
etc...?
  I'm not looking for all the answers, but tips on How to Get Started.

 This isn't difficult (but isn't simple too!), try compile PHP using
 --with-ibm-db2, and then use the "odbc" comand set (odbc_connect, etc).
 The implentation of DB2 in PHP uses the odbc calls (it isn't odbc, it uses
 the native DB2 cli). I use it here on my university to access a DB2 AIX
 box from my Linux Web Server.

Antonio.

 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Antonio S. Martins Jr. - System Analist |  "Only The Shadow Knows   |
 | WorldNet Internet Maringa - PR - Brasil |   what evil lurks in the  |
 | E-Mail: [EMAIL PROTECTED]  |   Heart of Men!"  |
 | [EMAIL PROTECTED]   | !!! Linux User: 52392 !!! |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This e-mail message is 100% Microsoft free!

  /"\
  \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
   X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
  / \







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Exit Function

2001-01-31 Thread Karl J. Stubsjoen

What is the way to exit a function?  For example:

function FooBar() {

if ($foo = $bar)
Exit_this_Function;

## otherwise execute the rest of this function
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HowTo: IBM DB2 w/PHP

2001-01-30 Thread Karl J. Stubsjoen

Hello,

We have succesfully installed the IBM DB2 RDMS on our Linux box and have
successfully made a connection to our AS400.  All through command line
though.
I am new to PHP, and am wondering:
How do I instantiate the IBM DB2 in PHP, call commands, run queries, etc...?
I'm not looking for all the answers, but tips on How to Get Started.

Thanks!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Readfile only return error

2001-01-30 Thread Karl J. Stubsjoen

Hello,

I'm performing a readfile, and am expecting that if the file isn't found and
error will return unless you add the @ symbol before the readfile function
as in:

$retrn = @readfile ($FileName);

My page only errors, and doesn't return false.  I don't want my page to
error, I would like to display a custom error message as in "Page not
Found".

Here is the code in its entirety:
 $retrn = 0;
 $retrn = @readfile ($FileName);
 print $retrn;

Thanks for the help!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Non Expiring Cookie

2001-01-29 Thread Karl J. Stubsjoen

Is this a never expiring cookie, or a "per" session cookie?  I want to
create a never expiring cooky.

SetCookie ("MyNeverExpiringCookie", "This cookie should never expire");

Thanks!

Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Not receiving [PHP] mail - is PHP Mailing List Down?

2001-01-29 Thread Karl J. Stubsjoen

I haven't received mail from the PHP list since the 27th.  Is it down?
Please respond to:

[EMAIL PROTECTED]

Thank you.

Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Why the Change in Ver 4?

2001-01-26 Thread Karl J. Stubsjoen

  Does Version 4 support either { } "squiglees" or [ ] "brackets" in this
  code:
  
  if($retrn{strlen($retrn)-1} == '')
  -or-
  if($retrn[strlen($retrn)-1] == '')
 
  Yes.  This is a 4.x feature only.  The idea is that in the long run, []
  will no longer be supported for string offsets, only {} will.

What is the motivation behind this change?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Check for Page

2001-01-26 Thread Karl J. Stubsjoen

How could I:

How could I check to make sure a page exists before I redirect to it (a page
within my own server, but page name passed in querystring - therefore it
could be changed by client)?

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Detect if Header has been written

2001-01-26 Thread Karl J. Stubsjoen

How can I check if Headers have been written to the browser?

Thank You!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Best way to describe Doc as HTML

2001-01-25 Thread Karl J. Stubsjoen

Hello, So I think I've found 3 ways to describe the HTML Doc as "HTML".
Which one is the best?

1) Via MetTag (this was generated in Dreamweaver):

head
meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"
/head

2) Print Statement at top of page:

print "Content-type: text/html\n\n";

3) Using the PHP Header command:

header( "Content-type: test/html" );

What do you think?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Read Vs. Include

2001-01-25 Thread Karl J. Stubsjoen

Hello,

I want to *read* a file into a page and not process any PHP.  I'm just
reading an HTML file.  I though it was simple, I thought I had it figured
out, but now when I try, I get the following error:

Fatal error: Call to unsupported or undefined function read() in
/var/www/wherever.com/betastore/iscookies.php on line 41

Here is the code (line 41 is superceded by a +):

37: # display no cookies message
38: function NoCookies() {
39: global $DOCUMENT_ROOT;
40: $LocalScript = $DOCUMENT_ROOT . "/betastore";
41:  read ($LocalScript . "/thispage.html");
42: }

Thanks for any help.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Test for Cookies

2001-01-24 Thread Karl J. Stubsjoen

Hi,

I need to test for cookies.  What is the simplest way to do this?

Thanks - Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Test for Cookies

2001-01-24 Thread Karl J. Stubsjoen

 Karl J. Stubsjoen [[EMAIL PROTECTED]] wrote:
  Hi,
 
  I need to test for cookies.  What is the simplest way to do this?

 Be a little more specific - do you want to know if there
 are cookies at all, or if there are specific cookies?

 Depends on the settings in the Data Handling section of your
 php.ini.  With register_globals = On and track_vars = On, I
 can do this:

both of these are On.  Is this a *FOR SURE* way to tell if cookies are
enabled on the
client machine???


if (sizeof($HTTP_COOKIE_VARS) == 0) {
   error_log("no cookies!!!");
}


or


if (empty($HTTP_COOKIE_VARS["my_cookie_1"])) {
   error_log("my_cookie_1 doesn't exist!");
}


 HTH.
 --
 Hardy Merrill
 Mission Critical Linux, Inc.
 http://www.missioncriticallinux.com

 
  Thanks - Karl
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] -

2001-01-24 Thread Karl J. Stubsjoen

What does - do?
As in:
$Something-then_something_over_here


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] -

2001-01-24 Thread Karl J. Stubsjoen

Aisch!  Hmmm... yep, clear as mud.  Let me describe what I we have going on:

We have a function called ToForm which looks like it verifies values coming
in from a POST.  This function is invoked like this:

$generic-ToForm("cart_id", NO_DEFAULT_VALUE);
$generic-ToForm("email_address", NO_DEFAULT_VALUE);

I don't understand the $generic- and what happens when it "becomes"
something twice.  The ToForm function looks like this:

function ToFORM($val, $default, $makeuppercase=0) {
global $FORM, $$val;
if(!empty(${$val}))
$FORM[$val] = trim(${$val});
else if($default != NO_DEFAULT_VALUE)
$FORM[$val] = $default;
if($makeuppercase)
$FORM[$val] = strtoupper($FORM[$val]);
}

Thanks for the help!

Karl


- Original Message -
From: "Cal Evans" [EMAIL PROTECTED]
To: "Karl J. Stubsjoen" [EMAIL PROTECTED]; "PHP Mailing List"
[EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 12:08 PM
Subject: RE: [PHP] -


 It's means that what's on the right is part of the object on the left.

 i.e.

 $myObject-myMethod();

 fires the method myMethod() of the object $myObject.

 echo $myObject-myAttribute;

 displays the value of the attribute myAttribute of the object $myObject.

 Clear as mud?  ;)

 Cal
 http://www.calevans.com


 -Original Message-
 From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 24, 2001 1:05 PM
 To: PHP Mailing List
 Subject: [PHP] -


 What does - do?
 As in:
 $Something-then_something_over_here


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Test for Cookies

2001-01-24 Thread Karl J. Stubsjoen

In IE | Tools | Internet Options | Security | Custom Level

You'll find 2 items under Cookies
  - Allow cookies that are stored on your computer
  - Allow per-session cookies (not stored)
Both haveing the options (enabled / prompt / disabled)

The cookie test script is succesful if and only if "per-session" is enabled.
Okay, my question is:
Does the 2nd Cookie Option "Per Session" imply that "that as long as the
browser(s) have not been closed down, that as long as any instance of IE is
running, that we have infact NOT terminated a "Session" and a cookie which
has been set in this session is available?  No matter where the user browses
to, the number of browser windows he opens, closes, jumps back and forth
between (just as long as at least 1 instance of IE is running the entire
time), is this "cookie session" still intact?"

And what about NS?

Karl


- Original Message -----
From: "Brian V Bonini" [EMAIL PROTECTED]
To: "Karl J. Stubsjoen" [EMAIL PROTECTED]; "PHP Mailing List"
[EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 12:56 PM
Subject: RE: [PHP] Test for Cookies


 You'll need to at least reload the page so
 the cookie can be sent back to the server
 after it's set.

 Try this: it's taken directly from the annotations
 on the setcookie function page of the php manual.

 ?php
 $status = 0;
 if (isset($myTstCky)  ($myTstCky == "ChocChip")) $status = 1;
 if (!isset($CCHK))

 setcookie("myTstCky", "ChocChip");
 header("Location: $PHP_SELF?CCHK=1");
 exit;
 }
 ?
 html
 headtitleCookie Check/title/head
 body bgcolor="#FF" text="#00"
 Cookie Check Status:
 ?php
 printf ('font color="#%s"%s/font
 ;',
 $status ? "00FF00" : "FF",
 $status ? "PASSED!" : "FAILED!");
 ?
 /body
 /html

  -Original Message-
  From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 24, 2001 1:42 PM
  To: [EMAIL PROTECTED]; PHP Mailing List
  Subject: Re: [PHP] Test for Cookies
 
 
   By trying to set a cookie and read it back.
 
  Okayhere is the scenario:
 
  User originates from STATIC Html page,
  Links to my PHP Cookie Test Page
  I set a cookie in my PHP Cookie Test Page
  Can I then check (safely) for cookies right away in my PHP Cookie
  Test Page
  without involving a 3rd page?
 
  Karl
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Redirect

2001-01-24 Thread Karl J. Stubsjoen

What is wrong with this redirect:

?
$rdrct = "http://www.dogpile.com";
header ("Location: " . $rdrct);
exit;
?

Thanks!  Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Test for Cookies (Stored vs. Session)

2001-01-24 Thread Karl J. Stubsjoen

So my Point is:

What if you require "stored cookies" - cookies written to the users disk?
Hmmm, this cookie test would return true if "per-session" cookies was
enabled and "stored cookies" was disabled.

Karl

- Original Message -
From: "Karl J. Stubsjoen" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; "PHP Mailing List" [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 1:49 PM
Subject: Re: [PHP] Test for Cookies


 In IE | Tools | Internet Options | Security | Custom Level

 You'll find 2 items under Cookies
   - Allow cookies that are stored on your computer
   - Allow per-session cookies (not stored)
 Both haveing the options (enabled / prompt / disabled)

 The cookie test script is succesful if and only if "per-session" is
enabled.
 Okay, my question is:
 Does the 2nd Cookie Option "Per Session" imply that "that as long as the
 browser(s) have not been closed down, that as long as any instance of IE
is
 running, that we have infact NOT terminated a "Session" and a cookie which
 has been set in this session is available?  No matter where the user
browses
 to, the number of browser windows he opens, closes, jumps back and forth
 between (just as long as at least 1 instance of IE is running the entire
 time), is this "cookie session" still intact?"

 And what about NS?

 Karl


 - Original Message -
 From: "Brian V Bonini" [EMAIL PROTECTED]
 To: "Karl J. Stubsjoen" [EMAIL PROTECTED]; "PHP Mailing List"
 [EMAIL PROTECTED]
 Sent: Wednesday, January 24, 2001 12:56 PM
 Subject: RE: [PHP] Test for Cookies


  You'll need to at least reload the page so
  the cookie can be sent back to the server
  after it's set.
 
  Try this: it's taken directly from the annotations
  on the setcookie function page of the php manual.
 
  ?php
  $status = 0;
  if (isset($myTstCky)  ($myTstCky == "ChocChip")) $status = 1;
  if (!isset($CCHK))

  setcookie("myTstCky", "ChocChip");
  header("Location: $PHP_SELF?CCHK=1");
  exit;
  }
  ?
  html
  headtitleCookie Check/title/head
  body bgcolor="#FF" text="#00"
  Cookie Check Status:
  ?php
  printf ('font color="#%s"%s/font
  ;',
  $status ? "00FF00" : "FF",
  $status ? "PASSED!" : "FAILED!");
  ?
  /body
  /html
 
   -Original Message-
   From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, January 24, 2001 1:42 PM
   To: [EMAIL PROTECTED]; PHP Mailing List
   Subject: Re: [PHP] Test for Cookies
  
  
By trying to set a cookie and read it back.
  
   Okayhere is the scenario:
  
   User originates from STATIC Html page,
   Links to my PHP Cookie Test Page
   I set a cookie in my PHP Cookie Test Page
   Can I then check (safely) for cookies right away in my PHP Cookie
   Test Page
   without involving a 3rd page?
  
   Karl
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Loop Through all Querystring Variables

2001-01-24 Thread Karl J. Stubsjoen

What is the simplest way to set up a procedure to loop through all passed
querystring values and/or form values?

I'm very new to PHP, and don't know how to set up loops at all.

Thanks!  Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Look for and Trim Last Character

2001-01-24 Thread Karl J. Stubsjoen

Hello, I'd like to check for a character at the end of a string, if it
exists remove it, example:

Looking for - Z
In string - StringZ
Result would be - String

-or-
Looking for - Z
In string - StringZzz
Result would be - StringZzz (no change)

Thanks!  Karl
BTW:  You guys are great!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] I give - Whats wrong

2001-01-24 Thread Karl J. Stubsjoen

I've tried and tried to figure out what is wrong with this function, but I
can't.  Could you please have a look.  This function reconstructs the
querystring values passed in the querystring:

function PassOnGetVars() {
 global $HTTP_GET_VARS;
#initialize retrn value
$retrn = "?";

#loop through each Get Var
 reset ($HTTP_GET_VARS);
 while (list($VariableName, $VariableValue) = each ($HTTP_GET_VARS))
 {
  retrn =. "$VariableName\=$VariableValue";
  retrn =. "";
 }

#return the value
 return($retrn);
}

I've tried both versions of =. and .= (struggling to remember which is
correct.  But this isn't the error, I get the same error regardles of the .=
The error I get is line 60 (which is)

  retrn .= "$VariableName=$VariableValue";

Thanks!  Karl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] I give - Whats wrong

2001-01-24 Thread Karl J. Stubsjoen

Freak'n Duhh!  My eyes are still blury to PHP *obviously*.
Thanks!

So $QUERY_STRING eh?  I'll look that one up.

Karl

- Original Message -
From: "Rasmus Lerdorf" [EMAIL PROTECTED]
To: "Karl J. Stubsjoen" [EMAIL PROTECTED]
Cc: "PHP Mailing List" [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 4:31 PM
Subject: Re: [PHP] I give - Whats wrong


 You could of course just check $QUERY_STRING

 As for your error, you a missing a $ in front of retrn at the beginning of
 that line.

 -Rasmus

 On Wed, 24 Jan 2001, Karl J. Stubsjoen wrote:

  I've tried and tried to figure out what is wrong with this function, but
I
  can't.  Could you please have a look.  This function reconstructs the
  querystring values passed in the querystring:
 
  function PassOnGetVars() {
   global $HTTP_GET_VARS;
  #initialize retrn value
  $retrn = "?";
 
  #loop through each Get Var
   reset ($HTTP_GET_VARS);
   while (list($VariableName, $VariableValue) = each ($HTTP_GET_VARS))
   {
retrn =. "$VariableName\=$VariableValue";
retrn =. "";
   }
 
  #return the value
   return($retrn);
  }
 
  I've tried both versions of =. and .= (struggling to remember which is
  correct.  But this isn't the error, I get the same error regardles of
the .=
  The error I get is line 60 (which is)
 
retrn .= "$VariableName=$VariableValue";
 
  Thanks!  Karl
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Local Path of Script

2001-01-22 Thread Karl J. Stubsjoen

How do I obtain the path of the local script?  Or do I have to build it from
the $DOCUMENT_ROOT?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ASP Guy Looking for Select Case equivalent

2001-01-19 Thread Karl J. Stubsjoen

Hello,

What is the equivalent command to Select Case as in:

Select case 10 + 2
case 10
'nope
case 11
'nope
case 12
'yep
case  13
'yep - but case 12 comes first!
end select


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Form Problems

2001-01-19 Thread Karl J. Stubsjoen

I'm having troubles : (
I can't seem to figure out how to retrieve the posted data.  I'm trying
this:
$HTTP_POST_VARS["Login"]

! WAIT ! as I write this, I'm guesing that maybe my problem is *scope* (and
not the mouthwash).  I'm going to try that right now, set the above var to
global within that function...

Yep, that was it... thanks guys!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Function / String Problem

2001-01-19 Thread Karl J. Stubsjoen

Okay, what is wrong with this:

   echo "brbr...are you logged in: $LoggedIn()brbr";
// outputs:...are you logged in: ()

Function is:
function LoggedIn(){
  global $HTTP_POST_VARS
if ($HTTP_POST_VARS["Login"] == "PHPIsCool")
{return "YES";}
else
{return "NO";}
}




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] but what if.. Function / String Problem

2001-01-19 Thread Karl J. Stubsjoen

What if I want the function to be processed within the " " quotes?  Same as
a variable might be interopelated?  IOW, can I call a function without
concantenating the function together with the string?

*being a little stubborn*


- Original Message -----
From: "Karl J. Stubsjoen" [EMAIL PROTECTED]
To: "PHP Mailing List" [EMAIL PROTECTED]
Sent: Friday, January 19, 2001 10:17 AM
Subject: [PHP] Function / String Problem


 Okay, what is wrong with this:

echo "brbr...are you logged in: $LoggedIn()brbr";
 // outputs:...are you logged in: ()

 Function is:
 function LoggedIn(){
   global $HTTP_POST_VARS
 if ($HTTP_POST_VARS["Login"] == "PHPIsCool")
 {return "YES";}
 else
 {return "NO";}
 }




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP Editors

2001-01-18 Thread Karl J. Stubsjoen

So what editor is recommended?  I'm a little familiar with Emacs (kinda
cool, but I'm use to keywords and such being colored - as in Interdev).

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Print vs. Echo

2001-01-18 Thread Karl J. Stubsjoen

What is the basic difference between print and echo?  As I am understanding
it, Echo allows you to define a multi-line area to output text without
having to repeat quoting for each line but then what is the advantage of
print?

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Variable Scope

2001-01-18 Thread Karl J. Stubsjoen

I'm a bit troubled with the fact that variables declared at the top of your
script are not then global to functions within that script.  That in order
to see that variable within a function you'd have to declare it as global in
the function (understanding that the variable could have been set at the top
of the script).  This seems extremely backwards to me (me being a VB guy).

Would someone kindly shine the light down upon me with an explanation of
this logic?  And why can't I possibly declare the variable as Global at the
top of my script?

Thats a big "H"


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Quotes and Values

2001-01-18 Thread Karl J. Stubsjoen

Hello,

I am trying to do this:

$myVal = "form name="$name"" action="$action" method="$method""
*trying to accomplish putting " qotes around my string values*

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Where is information about Forms?

2001-01-18 Thread Karl J. Stubsjoen

Hello,

Looking through the PHP Site (someone needs to improve the search features),
and can't find information about querying form field values etc...

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Hello

2001-01-17 Thread Karl J. Stubsjoen

Hello,

I'm an ASP guy gone PHP.  So, be patient with me as I struggle my way with
PHP.  I have a some experience with writing C like syntax, as with
JavaScript and TCL.  I hope to pick up PHP quickly.

2 Questions:
How to declare function and sub routines.
How to call functions and sub routines.

Thanks!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ASP to PHP

2001-01-17 Thread Karl J. Stubsjoen

Is there such thing as program that will convert ASP code to PHP code?  I
have built some nice libraries with ASP and am interested in converting
those over to PHP, rather than rewriting them!

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] include statement

2001-01-17 Thread Karl J. Stubsjoen

What about the security issue mentioned?  Is it then possible (using the
include and/or readfile) to grab anything found on the server?
1 More thing:  what if I wanted to place the contents of a file into a
variable.  How do you achieve that?

Karl *also a newbie, and this is a great group*




- Original Message -
From: "Adam Wright" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; "Michael Zornek"
[EMAIL PROTECTED]
Sent: Wednesday, January 17, 2001 10:18 AM
Subject: Re: [PHP] include statement


 For your things (where you are including HTML), readfile just reads a file
 and dumps it to the screen. This is fine, because you are just dealing
with
 HTML, so no processing is required. include will actually try and parse
the
 file as if it has PHP inside somewhere, which your HTML (probably) doesnt.
 So, readfile uses less resources, and is much more like the SSI include
 statement than PHP's include :)

 adamw

 - Original Message -
 From: "Michael Zornek" [EMAIL PROTECTED]
 To: "Adam Wright" [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, January 17, 2001 5:14 PM
 Subject: Re: [PHP] include statement


  Adam(and everyone else who answers in 5 minutes, god i love this list),
 
  thanks for the help.
 
  Why is readfile more 'correct'?
 
  Just wondering?
  Mike
 
  At 5:07 PM + 1/17/01, Adam Wright wrote:
  This is because the PHP include statement is ment to include other
blocks
 of
  PHP code, rather than bits of HTML. Hence, it includes things from
 anywhere
  on the system. To include things from under your current htdocs
 directory,
  use...
  
  include($DOCUMENT_ROOT . "/includes/metatags.include");
  
  though the more 'correct' method would be
  
  readfile($DOCUMENT_ROOT . "/includes/metatags.include");
  
  adamw
  
  - Original Message -
  From: "Michael Zornek" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, January 17, 2001 5:04 PM
  Subject: [PHP] include statement
  
  
I'm a PHP newbie and am looking into using the include statement to
put things like the header and footer in so they are always the
same.
  
I do this now with SSI. In SSI I'll use the following statement:
  
!--#include virtual="/includes/metatags.include" --
  
I like this cause it lets me use the same statement all over the
site
and I don't have to worry about where the document is and how many
directories i have to go up an into "../../../../../"
  
I was guessing PHP's version would be:
  
?PHP
include("/includes/metatags.include");
?
  
However I get an error. If I put the absolute it works:
  
?PHP
include("/home/httpd/includes/metatags.include");
?
  
which is scary cause this worked too:
  
?PHP
include("/usr/local/apache/conf/httpd.conf");
?
  
doesn't this seem like a huge security hole?
  
Well what I want is to use something like /inc/footer.html so i can
use the same PHP statements in any document and not worry about
getting it "../../../"
  
Any suggestions.
Mike
  
  
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
  
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ? PHP vs. ?

2001-01-17 Thread Karl J. Stubsjoen

Is PHP the implied script, so that it is okay to begin PHP code like this ?
vs. like this ?php
When is it not implied?

*wow, some real beginer questions!  eh?*


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Ver3.0 Includes

2001-01-17 Thread Karl J. Stubsjoen

Are includes supported in ver 3.0?
I'm having troubles with my includes.  Here is the include (after this
evening we will ver 4.0):

include ($DOCUMENT_ROOT . "/gophp/Main.php");



Thanks



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]