Try with preg_match_all()
PCRE functions are up to 25% faster than POSIX(ereg).
Best regards,
Andrey Hristov
- Original Message -
From: DigitalKoala [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 1:44 PM
Subject: [PHP] function that extracts numbers from
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all
Can anyone see any reason why this function does not appear to be
returning true? It appears to be returning 1 though?
[snip snip]
if(!$this-_db_connect()) {
return FALSE;
}
On Tuesday, February 12, 2002, at 11:24 AM, Nick Wilson wrote:
Hi all
Can anyone see any reason why this function does not appear to be
returning true? It appears to be returning 1 though?
[snip snip]
if(!$this-_db_connect()) {
return FALSE;
}
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Erik Price declared
Hm. I can't answer your question, but I'd like to ask you one. I've
been using 'return 1' or 'return 0' in my function calls -- is there an
advantage to using 'TRUE' or 'FALSE' rather than numbers? In other
Is there a way to set a variable or is there a function that takes the
information between the title tags and prints to the screen where you
command?
ei:
//head
//title
// ?php
// echo ?witakr home?
// ?
//
//LINK REL=stylesheet HREF=css/sCSS.css TYPE=text/css
///title
///head
where as i would
On Wednesday, February 6, 2002, at 11:06 PM, Lars Torben Wilson wrote:
On Wed, 2002-02-06 at 19:32, obo wrote:
is there a command in php to post form data to a script?
example:
i have a form. once the submit is hit i use php to check the values. if
the values are ok i then call a
Hey Vaclav:
Vaclav Muchna wrote:
system('/fullpath/ob', '100');
produce this message:
X-Powered-By: PHP/4.1.0
Content-type: text/html
No input file specified.
but, when i remove -q parametr from ob, it procude this message:
X-Powered-By: PHP/4.1.0
Content-type: text/html
#!
On Thursday 07 February 2002 22:45, Erik Price wrote:
I don't mean to butt in here, I'm just a bit confused. I thought that
the poster (obo) was asking how to submit form variables using POST.
For the purpose of doing more work with these variables, from a (PHP)
script. Is obo asking
is there a command in php to post form data to a script?
example:
i have a form. once the submit is hit i use php to check the values. if
the values are ok i then call a function
to post the data.
thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 6:06 AM
Subject: Re: [PHP] function to post data
On Wed, 2002-02-06 at 19:32, obo wrote:
is there a command in php to post form data to a script?
example:
i have a form. once the submit is hit i use php to check
Has anyone an idea on how to get information from PHP on the function call
stack.
I need the line number and file calling a function for a custom error
handler.
To be more clear, here is what I would like to do:
- I have a library, included in the main program
- I have an error handler in the
On Wed, 2002-01-30 at 03:33, Christian Novak wrote:
Has anyone an idea on how to get information from PHP on the function call
stack.
I need the line number and file calling a function for a custom error
handler.
This cannot be done in current versions of PHP. There are
feature requests in
[EMAIL PROTECTED]
To: Christian Novak [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 12:45 PM
Subject: Re: [PHP] Function call stack
On Wed, 2002-01-30 at 03:33, Christian Novak wrote:
Has anyone an idea on how to get information from PHP on the function
call
stack
Hello,
I wrote a PHP class to display an HTML calendar, and then wrote a subclass
of it for a specific project I'm working on. Here is the entirety of the
subclass:
// create our new sub-class of the calendar
class rantCal extends calendar {
function get_link($day) {
$link = ;
if
Hello all,
I'm trying to pass the $HTTP_POST_VARS array into a
function to run some things like strip_tags, trim, and
htmlspecialchars on all of the variables. If possible,
I would like to pass this array by referrence, and
have the function make changes to the actual array and
not a copy.
] = strip_tags($i);
}
}
and after this function $GLOBALS[HTTP_POST_VARS] will look like you want it
to.
Jim Lucas
bend.com
- Original Message -
From: Bryan McCloskey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 21, 2002 2:19 PM
Subject: [PHP] function trouble: pass
Hi, how do i tell a function which arguments can be passed and which must be passed...
example:
function func($arga, $argb, $argc)
{
do_something_with_arga;
do_another_thing_with_argb;
and_if_argc_was_passed_do_something_with_it_too;
}
because i dont want to pass argc if i dont need it, and to
: Thursday, January 18, 2001 2:17 PM
Subject: [PHP] function arguments
Hi, how do i tell a function which arguments can be passed and which must be
passed...
example:
function func($arga, $argb, $argc)
{
do_something_with_arga;
do_another_thing_with_argb
Subject: [PHP] function arguments
Hi, how do i tell a function which arguments can be passed and which must be
passed...
example:
function func($arga, $argb, $argc)
{
do_something_with_arga;
do_another_thing_with_argb;
and_if_argc_was_passed_do_something_with_it_too;
}
because i dont
Im trying this little example of mine, Im trying to include
a file from a remote webserver but could not possibly get
it to work..
Here is the written code:
### A WORKING CODE // LOCAL FILE
?php
$file = one.php;
include($file);
?
###
### DID NOT WORK // REMOTE FILE
?php
$file =
Hi louie,
Im trying this little example of mine, Im trying to include
a file from a remote webserver but could not possibly get
it to work..
could be because the url fopen wrapper is disabled.
check the value of this setting in your php.ini file:
allow_url_fopen
--
Jimmy
Hi,
As you all may know, this is how you set an optional second argument, that
defaults to acidophilus
function makeyogurt ($flavour, $type = acidophilus)
{ }
I'm now looking for a way to have the second (optional) argument be an array
of strings. I can't get it to work though...
In
Can't test it now, but have you tried
function makeyogurt ($flavour, $type = list())
I assume you need it to be an array because you want to either walk it or, more
likely, perform an in_array() test on it and you found that passing non-array
variables to in_array issues an error. If
At 01:17 PM 12/22/2001 +0100, Michael Jurgens wrote:
I'm now looking for a way to have the second (optional) argument be an array
of strings. I can't get it to work though...
In pseudo-code:
function makeyogurt ($flavour, $type = 'EMPTY ARRAY')
{ }
Does this work?
function makeyogurt
In pseudo-code:
function makeyogurt ($flavour, $type = 'EMPTY ARRAY')
{ }
function makeyogurt ($flavour, $type = array()) {
...
}
or
function makeyogurt ($flavour, $type = array('a','b')) {
...
}
regards,
Philip Olson
--
PHP General Mailing List
HI!
What's the PHP function that will parse the integer data to a string?
The problem I'm having is that I use the date() and microtime() and assigned
it to a variable. Later on, when I use this same variable but it have
different time, meaning hte clock is still ticking inside the variable
Dear sir,
I used PHP 4.1.0 and Oracle 9i running on RedHat-7.2.
I have question about Oracle function OciLogon().
I have problem about my source below.
?php
$db = ;
$c1 = ocilogon(scott,tiger,$db);
$c2 = ocilogon(scott,tiger,$db);
?
When run
I cannot seem to find in the documentation the what the function mysql() is aliaseed
to using PHP4.0.6. Any ideas?
Example:
$rez=mysql($dbname,$query);
Everything works fine... But I want to be sure what is actually being used.
/dkm
]
To: [EMAIL PROTECTED]
Sent: Thursday, December 06, 2001 3:12 PM
Subject: [PHP] Function Alias: mysql()
I cannot seem to find in the documentation the what the function mysql() is
aliaseed to using PHP4.0.6. Any ideas?
Example:
$rez=mysql($dbname,$query);
Everything works fine... But I want
: Re: [PHP] Function Alias: mysql()
Are you sure that isn't a custom function in your code (assuming you're
using somebody else's code)?
It could be an alias to: mysql_db_query()
It has the same handlers, ex:
$rez=mysql_db_query($dbname,$query);
Tyler Longren
- Original Message
Hello,
Does anyone know of a way, that from within a function, you can determine
what line number and file the function was called on?
I did try:
function myfunc($lineno = __LINE__)
{
echo $lineno;
}
but this just outputted the very line that __LINE__ resides on.
This would be very
Where can i find the code for the array_search() function in php4.I do
have php4 but the function isnt found.The in_array() function is found.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
On Mon, 29 Oct 2001 21:19, De Necker Henri wrote:
Where can i find the code for the array_search() function in php4.I
do have php4 but the function isnt found.The in_array() function is
found.
According to the docs, that wasn't introduced unntil 4.05, so if you have
an earlier version you
Does anyone know of a function that assists with checking URL
strings to make sure they haven't been monkeyed with?
Ideally something that calculates the md5 hash of a string and then
automatically verifies it when a user clicks a link.
I've checked the usual places (hotscripts, devshed,
Hello Steve,
Thursday, October 25, 2001, 10:30:16 PM, you wrote:
SC On Thursday, October 25, 2001, at 02:08 PM, Martín Marqués wrote:
On Jue 25 Oct 2001 15:36, you wrote:
Hello php-general,
I have such code:
class A
{
var $xxx;
function print()
{
on. In this case it would be similar as if
you wrote:
?php
function array() { /* ... */ }
// or
function and() { /* ... */ }
// or
function $+() { /* ... */ }
?
In all these cases php writes Parse error: ...
--
Best regards,
Olexandrmailto:[EMAIL PROTECTED]
--
PHP
Hello php-general,
I have such code:
class A
{
var $xxx;
function print()
{
echo $xxx;
}
}
And that's what I get:
Parse error: parse error, expecting `T_STRING' in xxx.php on line nn
Php doesn't let any function or class member
On Thursday, October 25, 2001, at 02:08 PM, Martín Marqués wrote:
On Jue 25 Oct 2001 15:36, you wrote:
Hello php-general,
I have such code:
class A
{
var $xxx;
function print()
{
echo $xxx;
$xxx is internal to the print function.
Hi folks
Just in case I am missing something -
Is there any way for a function to determine the name of the calling
function?
I want my database abstraction layer to be able to log query errors against
the name of the calling function, but I would rather not have to pass the
name in the query
Antwoord naar: [EMAIL PROTECTED]
Van:Dan Harrington [EMAIL PROTECTED]
Onderwerp: RE: [PHP] Function to Build Trees
Or you could just buy from http://www.plumbdesign.com/
or write a PHP SDK for them.
:-)
sorry? what does that horrible coldfusion
Onderwerp:[PHP] Function to Build Trees
A most interesting question!
Given a multidimensional array with words as keys, I want to match
the values of each array with the keys of the array and build a new
array that reflects these relationships as a sort of tree. So
Hi,
please, how to run php function which update mysql db from command line?
Thanks in advance
--
Moise Bertrand TACHAGO
Computer scientist, Volunteer DBMS Specialist
SDNP Cameroon, 506 Hajal Center Building, Yaounde CAMEROON
phone (237)22 24 90
E_mails [EMAIL PROTECTED]
[EMAIL
[EMAIL PROTECTED]
www.captainjack.com
On Mon, 20 Aug 2001 14:13:34 +0100
Moise Bertrand TACHAGO [EMAIL PROTECTED] wrote:
Hi,
please, how to run php function which update mysql db from command line?
Thanks in advance
--
Moise Bertrand TACHAGO
Computer scientist, Volunteer DBMS
Or you could just buy from http://www.plumbdesign.com/
or write a PHP SDK for them.
:-)
-Original Message-
From: Chris Hayes [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 4:15 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Function to Build Trees
Onderwerp
Hello everyone,
I've been tearing my hair out trying to write a function in PHP that
will accomplish the following:
Given a multidimensional array with words as keys, I want to match
the values of each array with the keys of the array and build a new
array that reflects these relationships
hi.
do we have function like exit in php??
for exit from program.
best regards.
--
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]
Sorry for the dummies question, but how do I insert into string like:
echo balalala
how to insert function in the midle like :
echo balalala [trim(odbc_result($result_id,3))] aasasasas
Thank you.
- Original Message -
From: René Moonen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Try readin the manual before posting.. all you want is the string
concatenation operator .
PHP is weakly typed so no direct conversion is needed
echo balalala . trim(odbc_result($result_id,3)) . aasasasas
Sorry for the dummies question, but how do I insert into string like:
echo balalala
On Tue, Aug 07, 2001 at 02:30:31PM +0200, Veniamin Goldin wrote:
Sorry for the dummies question, but how do I insert into string like:
echo balalala
how to insert function in the midle like :
echo balalala [trim(odbc_result($result_id,3))] aasasasas
Thank you.
How about:
echo
I'm looking for a way to have a url for a link explode into the actual url
address. So for example, on a dynamically created webpage, I have a link
called: Contact.
When someone chooses to view the printer friendly version of this page, I
want the link on the the printer-friendly page to
:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 11:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP] function that will print the url for embedded links
I'm looking for a way to have a url for a link explode into the actual url
address. So for example, on a dynamically created webpage, I have a link
Let me know if you find anything out about this because it's something I too
would like to use.
- seb
-Original Message-
From: Richard Kitamura - Media Net Link, Inc. [mailto:[EMAIL PROTECTED]]
Sent: 24 July 2001 23:40
To: [EMAIL PROTECTED]
Subject: [PHP] PHP function to extract EXIF
Does anyone have a PHP function that extracts EXIF data from a JPG image
that they can send or post? I read about re-compiling with the EXIF flag,
but would rather avoid doing that for a little while.
Thanks,
Richard Kitamura
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
I've got PHP a routine that encodes some sensitive information using PGP and
then emails this from my linux server to a few separate people
People using Outlook (full version) see a perfectly formatted message when
it gets decoded.
People using Outlook Express see the message with the \n
str_replace(\n,\r\n,$input)
??
Tyler
- Original Message -
From: Scott Brown [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 18, 2001 4:27 PM
Subject: [PHP] What PHP function to use to clean up PGP encoded text under
Outlook Express?
I've got PHP a routine that encodes
Hi,
Does someone know how I can call a function in a PHP script using a
hyperlink with
A HREF=.text/A
The function is in the same PHP script as the link.
Many thanks,
Geer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Why not just pass a variable: a href=file.php?function
and then in the PHP file do:
if ($function) {
function();
}
Ryan Shrout
Amdmb.com
-Original Message-
From: Geer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 1:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP
:)
-Original Message-
From: Geer [mailto:[EMAIL PROTECTED]]
Subject: [PHP] Function call from a hyperlink
Hi,
Does someone know how I can call a function in a PHP script using a
hyperlink with
A HREF=.text/A
The function is in the same PHP script as the link.
Many thanks,
Geer
that.
-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:16 AM
To: 'Geer'; [EMAIL PROTECTED]
Subject: RE: [PHP] Function call from a hyperlink
Why not just pass a variable: a href=file.php?function
and then in the PHP file do:
if ($function
design...
-Original Message-
From: Chadwick, Russell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 1:21 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Function call from a hyperlink
another way is to do eval () on $function but that kinda stuff is really bad
I'm making a map (image) which you can click on and the script finds the
area-code based on where you click on the map.
Before I spend time on writing my own code to find if xy values are
within a certain coordinates of a polygon, do you know of any build in
function to do it? I have browsed
Personally, I kind of like:
switch(1){ default: // BREAK BLOCK START
blah blah blah...
// Want to get out of here...
break;
} // BREAK BLOCK END
It's a little more cumbersome than the while construct, but it is absolutely
guaranteed to only go through once, whilst the while
Is there a func() that will let me break or skip to the END of the ? ?
code
snippet?
I have a file that contains both HTML and PHP.
html header code
? if condition skip; ... php code ... ?
html footer code
I know there are several ways of attacking this. Including making a func()
that
PROTECTED]]
Subject: [PHP] Function Reqest/Question
Is there a func() that will let me break or skip to the END of the ? ?
code
snippet?
I have a file that contains both HTML and PHP.
html header code
? if condition skip; ... php code ... ?
html footer code
I know
[gts] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 3:33 PM
To: php
Subject: RE: [PHP] Function Reqest/Question
i dont know of a function to skip to the end of the
nearest ?, and i suspect that there isn't one...
you can use other control func's to do what you need,
in the context
Look for 'allow_url_fopen' in your config file.
Black S. [EMAIL PROTECTED] wrote in message
9hi6hi$2s9$[EMAIL PROTECTED]">news:9hi6hi$2s9$[EMAIL PROTECTED]...
I have found the problem with my previous post and PHP functions no longer
working. It seems the code:
I have found the problem with my previous post and PHP functions no longer
working. It seems the code:
include(http://www.domain.com/path/to/file.txt;);
no longer works? If I type in a complete directory path then it works great,
but no Internet include, any one know why?
Thanks
--
PHP
: [EMAIL PROTECTED]
Sent: Thursday, June 28, 2001 10:48 AM
Subject: [PHP] Function
Hi,
Is there any function to replace a character in an Array ??.
Thanx in adv.
~ Karthick.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hi,
Is there any function to replace a character in an Array ??.
Thanx in adv.
~ Karthick
--
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,
Is there any function to replace a character in an Array ??.
Thanx in adv.
~ Karthick.
--
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
Is there any statement analogous to perl's caller which will tell you what
called the current function?
I would like to enforce the privacy of some of the class methods I am writing.
Thanks,
Morgan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
There has been a discussion similar to this. But unfortunately PHP doesn't
have such feature.
Morgan Curley [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Is there any statement analogous to perl's caller which will tell you what
called the current function?
untested!
?
if (strlen($word) 17) { $padding = 17-strlen($word); $word .= str_repeat('
', $padding); unset($padding); }
?
The reason for the if statement is that str_repeat will produce an error if
17-strlen($word) = 0 and that'll break your scriptof course you could
remove the if state if
On Mon, May 21, 2001 at 10:04:21AM -0500, Tolga thorr Orhon wrote :
One improvment:
$strpad = HELLO;
echo str_pad(substr($strpad,0,17),17);
why ?
- Markus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hello All,
I need to output a string that must always be 17 characters even if the inside value
is not.
Supose a have the HELLO word that is a 5 character string and I need to output HELLO
which is 17 characters.
How can I accomplish this in PHP4 ?
Has anyone ever did it?
On Sun, 20 May 2001 22:03:05 -0300, Carlos Fernando Scheidecker
Antunes ([EMAIL PROTECTED]) wrote:
Hello All,
I need to output a string that must always be 17 characters even if
the inside value is not.
Supose a have the HELLO word that is a 5 character string and I need
to output HELLO
Hi. I'm hoping you folks can help me with a function problem I have.
Take a look at the following code:
?
?php
function fill_page($title) {
?
html
head
title?php echo $title; ?/title
?php
}
?
I have a page divided into 3 sections
I am creating a function called login, I have a main file called index.php
.. which has my login form , it calls a login.php file, and in that
login.php there is file include statement which calls config.php and that is
where the function lie. This is my function , now if i don't set this as a
Define how index.php calls the login.php file. I assume you mean index.php
include() login.php, which has include() on config.php? If so, be sure that
the path to config.php as included in login.php is right. Use the fully
qualified path to ensure it works right.
Other than that, as long as the
Hi, The Zend site talks about the 4.05 release having an experimental
fastcgi API.
I have had absolutely no luck searching the php site(s), google, etc to get
info on this. Can anyone help? I've been looking at the 4.05 src, but it
isn't really that edifying for what I need (a list of
Hi,
I just don't get it...I have a form where the user enters name, surname
and a personal code. The action page checks for correct input which
is only letters for the two names and only numbers for the code.
If there is a wrong input in one of the fields a variable is set
which is then (amongst
Well, what can I say??? Magic windows
Reboot the system or post a message and it works!
johannes
Johannes Janson [EMAIL PROTECTED] schrieb im Newsbeitrag
9d93c3$7d8$[EMAIL PROTECTED]">news:9d93c3$7d8$[EMAIL PROTECTED]...
Hi,
I just don't get it...I have a form where the user enters
if($l==d) {
log_user();
} else if($r==d) {
add_user();
} else {
$r =y;
}
looks like:
1. $l is not set to d.
2. $r is not set to d.
$r may be set to y by this code. Did you check it?
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
]
To: 'PHPhyperboy' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, April 23, 2001 10:25 PM
Subject: RE: [PHP] function in if statement not executed ?-- Help
if($l==d) {
log_user();
} else if($r==d) {
add_user();
} else {
$r =y;
}
looks like:
1. $l is not set to d.
2. $r
So sprach Nando2 am Mon, Apr 16, 2001 at 03:28:11PM -0300:
Can anyone remind me of that?
(raw)urlencode
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com | http://www.iso-top.de
iso-top.de - Die
I'm trying to remember what is the function to replace blank spaces with %20.
Can anyone remind me of that?
Thanks,
C.F.
I'm trying to remember what is the function to replace blank
spaces with %20.
Can anyone remind me of that?
urlencode();
Chris
On Mon, Apr 16, 2001 at 03:28:11PM -0300, Nando2 wrote:
I'm trying to remember what is the function to replace
blank spaces with %20.
Can anyone remind me of that?
urlencode()
urldecode()
-fkr
--
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0
osetup/auto/test.php on line 25
?php
function getdata( ){
#
global $domain,$tld,$firstname,$lastname,$userid,$passw,$email,$package,
$frontpage,$mysql,$userdatabase,$newuser,$newuserpass;
if(file_exist
f the
program. When
I
do this I get a Parse error: parse error in
c:/httpd/htdocs/autosetup/auto/test.php on line 25
?php
function getdata( ){
##
##
#
global $domain,$tld,$firstname,$lastname,$u
i'm trying to make all my include files into functions for
manageability. I have one function that i'd like to get to work.heres
teh code..
?php
$db = mysql_pconnect("localhost", "user" ,"pass");
mysql_select_db("database",$db);
?
i had it in a function and had the function return
"Richard Kurth" [EMAIL PROTECTED] wrote:
I can not seem to get this figuered out I whant to run this function to
pull
data out of a file and thin use the data in the rest of the program. When
I
do this I get a Parse error: parse error in
c:/httpd/htdocs/autosetup/auto/test.php on line 25
should work(works for me).probly something simple.
?php
function conn(){
$db = mysql_pconnect("localhost", "" ,"");
mysql_select_db("database",$db);
return $db;
}
$db = conn();
$result= mysql_query("select * from table",$db);
while($myrow=
I usually declare $db as global in the function, so I can just execute the
function and continue with my querys.
--
Plutarck
Should be working on something...
...but forgot what it was.
"Kurth Bemis" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
i'm trying
say you include a function in a page, and then you call that function.
Is there a way (without actually passing through the parameters) for that
function to know which page and which line called it?
That would be VERY cool!
Peter
~~
http://liga1.com:
Yes, that would be really cool. I my self has tried to find a way to do
this, and throw this question to the list sometimes ago... no repond.
What would be great, if we can do this, is that we can somehow create a
pseudo-private method for classes (since php OO does not have that), and
limit
Addressed to: "Reuben D Budiardja" [EMAIL PROTECTED]
[EMAIL PROTECTED]
** Reply to note from "Reuben D Budiardja" [EMAIL PROTECTED] Wed, 28 Mar 2001
12:44:55 -0500
Yes, that would be really cool. I my self has tried to find a way to do
this, and throw this question to the list
Hi !
I'm trying to use the function mail().
?php mail("[EMAIL PROTECTED]", "subject", "message"); ?
I get :
Warning: Failed to Connect in D:\IBOIS\web\test.php on line 1
I'm using the lastest version of PHP on IIS 4.0
What's wrong ?
Should I change the php.ini ?
If I try to use the snmp
See the SMTP value in your PHP.ini and set it to a valid outgoing mail
server
Another thing I have noticed, perhaps this is only me, is that if the
TO-address isn´t valid it will fail.
Try to send an email to your own email address...
// Tobias
""Eric Tonicello"" [EMAIL PROTECTED] wrote in
I am constructing a function for retrieving records from a mysql database
and putting them into an array called $print_field[name][number].
My problem is that I only seem to get the first two records and I think I
know where the problem is, but I can´t seem to be able to solve it.
Any ideas
701 - 800 of 830 matches
Mail list logo