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.
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]
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*
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
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
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
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
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
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:
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
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,
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
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
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. St
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
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]
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
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]
ginal 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
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
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
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. Stub
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
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
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
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 PROTE
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:
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
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
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]
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]
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
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
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
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
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, Januar
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,
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...
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]
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
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
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:
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
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:
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
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 PROTE
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
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
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
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
(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
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
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
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
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
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
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
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
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
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]
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
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
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"
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,
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
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
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
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
68 matches
Mail list logo