Mike Zornek wrote:
I wrote an importer script in PHP that outputs the percentage of items
finished in 5% chunks. When I run the script however (web or command
line) I don¹t get incremental output .. I get it all in one fell
swoop.
I have a feeling PHP is buffering it or something. It there
Curt Zirzow wrote:
I have a feeling PHP is buffering it or something. It there any
command I can use to disable such buffering for just this script so
I can see some useful feedback. Thanks!
Use this at the top of the script:
ini_set('output_buffer', 0);
The output_buffering setting
Cere Davis wrote:
In other scripting languages like Perl/Ruby/Python (that aren't meant
to live in the web environment exclusively) there usually have a web
library that writes basic html form input html types for like
radio_button(name,val) and checkbox(name,val) type functions. I can't
see
peter a wrote:
It not just that page.. it is all pages the will generate some sort of
PHP error. Instead of the usual error output I get nothing.
Sounds to me like the apache process is segfaulting when PHP's error handler is
invoked. You say it used to work for you, what changed recently?
Jay Blanchard wrote:
[snip]
strpos() : 0.18918436765671
preg_match() : 0.26665662288666
[/snip]
1/3rd of a second slowerinteresting. You know what though, my
original assertion is correctalmost any of the regex functions
will work.
Personally, I prefer using preg_match() 9 times
John Nichel wrote:
OOP is not my strong suit, and I'm trying to work with someone
else's code, but am having trouble accessing a value. Let's say I
have an object called $bob, and doing a print_r on $bob produces
this
Array
(
Are you sure $bob is an object? It says above that it's
John Nichel wrote:
Michael Sims wrote:
John Nichel wrote:
Are you sure $bob is an object? It says above that it's an array.
If $bob were an object, print_r() should give objectname Object
instead of Array.
Nah, that's just my bad typing without thinking. When I
print_r($bob), it does
David T-G wrote:
% you can make the .* less greedy...
%
% $text = preg_replace('/!--.*?--/', '', $text);
How does that make it ungreedy? The only thing I see relating
question marks and greediness is that a question mark makes part of a
regexp with a /U modifier (otherwise not greedy)
Ahbaid Gaffoor wrote:
Thanks Ryan,
but what I want is to be able to pass any variable to a procedure and
have the variable name and value printed by the procedure.
Can this be done?
I'm trying to extend my library of debugging functions/procedures by
having a procedure which can be
Dave Avent wrote:
function showvar($var) {
foreach($GLOBALS as $key = $value) {
if($value == $var) {
$varname = $key;
}
}
The problem with the above is that it assumes that there
Richard Davey wrote:
The actual error comes from a hyperlink that passes a parameter on the
Querystring, like this:
1. Line 58, column 62: cannot generate system identifier for general
entity f ...ef=xt/xt_apollo_mark_read.php?i=allf=1
You should be using amp; as a separator instead of
John W. Holmes wrote:
You want instead of ||
if ($cat_id != 53 $cat_id != 54 $cat_id != 55 $cat_id
!= 117 $cat_id != 118 $cat_id != 74)
For stuff like this I've always found the following slightly easier on the
eyes:
if (!in_array($cat_id, array('53', '54', '55', '117', '118', '74')))
OrangeHairedBoy wrote:
I would like to use eval() to evaluate another PHP file and store the
output of that file in a string.
You could use output buffering to do this a bit more easily, I think:
ob_start();
include('colors.php');
$colors = ob_get_contents();
ob_end_clean();
--
PHP General
OrangeHairedBoy wrote:
I would like to use eval() to evaluate another PHP file and store
the output of that file in a string.
You could use output buffering to do this a bit more easily, I think:
ob_start();
include('colors.php');
$colors = ob_get_contents();
ob_end_clean();
While that
On Thu, 30 Oct 2003 22:54:49 +0100, you wrote:
Hi there,
I'm having trouble with passing objects as references. What I want to
do is something like this:
[snip code]
The above code give the output:
instance:
parent: test
where I want it to give:
instance: test
parent: test
I don't pretend
On Sat, 16 Aug 2003 07:58:27 +0200, you wrote:
$test = array(1=foo,2=zoo);
and i want to call the fuction foo() and zoo something like;
$object-$test[1]();
I've never used this myself, but this should work:
call_user_func($object, $test[1]);
See:
On Tue, 15 Jul 2003 11:00:27 +0300, you wrote:
WHAT PORTS PHP USE WHEN COMUNICATING WITH MSSQL SERVER OVER THE NETWORK?
I only have experience with MS SQL Server 7. It listens on TCP port
1433.
I have an Linux server running Apache/PHP/MySQL.
and I need to connect to another server running
On Tue, 15 Jul 2003 19:36:42 +0300, you wrote:
how can i specify the port for the direct connection
mssql_connect()
I've never had the need to do this, so I cannot verify that this
works, but I believe you can supply a port number in the servername
argument:
mssql_connect('192.168.0.1:1433',
Hi,
Sorry if this is frowned upon, but my company is looking for another
PHP developer, and I figured I'd post the job ad here. We haven't had
much luck finding PHP people in the past so I was hoping maybe I'd
catch some eyes of people who maybe aren't necessarily actively
looking for a new job.
On Thu, 3 Apr 2003 12:17:50 +0100, you wrote:
Has anyone experienced this, and if so know of a possible solution?? I have
used addslashes() etc but still no joy.
In addition to what the other respondents have said, you can set the
INI setting magic_quotes_sybase to 1, and this will change
On Wed, 26 Mar 2003 17:23:33 +0100, you wrote:
Im Very Sorry / Embarrased.. my code example had a mistake with extra
linebreak. Here is the example with out it, which gives a different MD5
hash.
I don't know why this is, but if you call Digest::MD5-md5_hex() in a
procedural rather than OO way,
On Thu, 13 Mar 2003 02:25:57 -0800, you wrote:
Ok, well I have a form that uploads images, but of course the problem is, is
that IE caches the uploaded images. The only way to clear the cache is to
refresh, but that isn't a very user friendly approach. I've tried the
following header tags:
You
On Mon, 3 Mar 2003 19:51:09 -0500, you wrote:
preg_match_all('/begincommand(.*)endcommand/',$messagebody,$commandOuttake,P
REG_PATTERN_ORDER);
[...]
How
do I change the criteria to stop at the first instance of a match? How do I
parse out only up to the first instance of endcommand?
Here's an
On Sat, 1 Mar 2003 17:26:37 +0300, you wrote:
Dear Sirs,
I wa using
my @InBody = STDIN;
To get data from email after piping. I am not sure that what I should use to
have same result with php?
Hi,
Read the section beginning with Table 23-2. CLI specific Constants
here:
On Thu, 27 Feb 2003 14:31:45 -0800 (PST), you wrote:
Basically, it runs on the
MS-SQL server and allows requests in XML format on a certain port.
That's actually pretty cool, from a tech standpoint, but why not
access the MS-SQL database directly? From Windows it's easy, you just
need the SQL
On Sat, 22 Feb 2003 07:23:20 -0500, you wrote:
Hi, all --
How can I tell if a directory is writable? It seems that is_writable
only works on file, and the mode I get out of stat() is [in this case,
anyway] '16895' for a 0777 dir.
The 16895 is in decimal. Use decoct() to convert it to octal
On Sat, 22 Feb 2003 11:49:09 -0500, you wrote:
The real problem still remains, however; if it's not writable for all,
then I need to see whether or not its writable, and preferably without
checking the making of a temp file or digging into UID/GID and group
membership and so on...
I wouldn't
On Tue, 11 Feb 2003 08:27:57 -0600, you wrote:
Thanks for the reply. I had already tried usort previously. For some
reason, there is no data for the array fields at all in the cmp function
- not sure why. Does anyone know? All help is appreciated! Thanks.
Can you post a short code sample
On Mon, 10 Feb 2003 16:23:10 -0600, you wrote:
Hi.
Im working with a multidimensional array where the data in the
array is a class (struct). All the information is being stored correctly,
but I need to sort each column (AA0, BA0, etc. see below)
by the fieldNo portion of the struct.
On Sat, 1 Feb 2003 07:08:05 -0500, you wrote:
Is there any way to access the Function Stack from php?
Starting with PHP 4.3.0 you can use debug_backtrace(), which returns
an array of caller stack information. You might want to build a
wrapper around it which formats the information the way you
On Sat, 1 Feb 2003 19:59:00 -0800, you wrote:
PHP keeps track of what line# is being executed, so that when there's an
error (say in pg_exec() ) it reports what line the error occured on.
[...]
Is there a function where I can access this information? Something like
get_line(); or something?
On Fri, 24 Jan 2003 13:05:16 +0100, you wrote:
and my ls dir
-rw--- 1 nobody nobody 3687 Jan 23 14:25 phpqlG5ny
-rw--- 1 nobody nobody621 Jan 22 21:06 phpqt95I4
-rw--- 1 nobody nobody424 Jan 23 00:04 phprM5Vkx
[...]
Some PHP applications do their own
On Fri, 24 Jan 2003 11:48:50 -0600, you wrote:
What I need is to change users password on the server, I want to write
that script and it needs to be safe. So I don't know what should I use.
I think I will need to check username and password, then log in through
website with it and then use passwd
[top-posting fixed]
Jason K Larson [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Discussion on this list has suggested that it can work if PHP is set to
run as ISAPI, not CGI.
Do you know how do do this?
Although using the ISAPI dll version of PHP would
On Tue, 21 Jan 2003 20:17:40 -0700, you wrote:
I tried a test file with this, and the form is sent, and the nph-test2.php
file returns this
Status: 302
Content-type: text/html
X-Powered-By: PHP/4.3.0
Location: test.php
Set-Cookie: testcookie=test
I'm a bit confused. Is it working for you now,
On Wed, 15 Jan 2003 17:23:26 -0800, you wrote:
I have a form created by this code (I don't know if it's important):
if ($_POST[submit]) {
[...]
After you fill out the only field, you HAVE to click the submit button to
submit the form. If you press enter to submit the form it reloads the form
On Thu, 16 Jan 2003 12:34:26 +1100, you wrote:
Hi,
Can someone point me to the page in the manual where this style of control
structure syntax is documented?
$var = ($something) ? foo : bah;
This is the ternary operator. It's kinda buried in the documentation:
On Tue, 14 Jan 2003 01:20:54 -0700, you wrote:
Hi,
I was playing around with error handlers, and tried this:
[...]
Which worked just fine. A little too good, in fact.
I got over 1,200 emails in a matter of minutes (high traffic site).
I'm not sure whey restore_error_handler() isn't working,
On Wed, 15 Jan 2003 13:25:05 +0900, you wrote:
If it's not asking too much would you be willing to share that custome
error handler you wrote?
It's a big long so I'm sending it to you off-list. If anyone else is
interested just send me an email off list and I'll send you a copy...
--
PHP
On Tue, 14 Jan 2003 22:34:49 -0700, you wrote:
Unless I am mistaken, the typical behavior for most browsers is exactly
as you described. Which is due to the browser receiving a Location
header and acting on it, disregarding any other headers. (ex:
cache/no-cache, cookies, etc)
Anybody care
On Wed, 15 Jan 2003 01:36:26 -0500, you wrote:
Wow. You hit the nail on the head. :)
Well, I spent a good day or two hunting the problem down the first
time I ran across it. Spending that much time on something tends to
make it stick in your head. :)
I installed PHP on IIS via the
On Tue, 14 Jan 2003 23:38:11 +0100, you wrote:
Hi all,
is there a way to execute a custom function as soon as an error happens in
PHP? I looked at the set_error_handler function, but it doesn't seem to trap
all the errors. What I want to achieve is to execute a function that mails
me the error
On Fri, 10 Jan 2003 10:38:31 + (GMT), you wrote:
On Wed, 8 Jan 2003, Macrosoft wrote:
Can anybody explain me what does mean error:
Warning: main(footer.inc.php) [function.main.html]: failed to
create stream:
Too many open files in /www/sql/main.php on line 96
On Thu, 9 Jan 2003 17:33:02 +0800, you wrote:
I believe
that there is a way to make the mail server, or which ever it is, to
response specifically to text within the mail.
[...]
However, I have no idea how this is accomplished and what this system is
called, so I need some precious help here.
On Tue, 07 Jan 2003 22:49:45 +0100, you wrote:
hi!
is it possible to make different modify actions (add, delete, etc.)
during a single request?
for changing a password in the NDS i would have to
first delete the 'userPassword' and right after that add the new
'userPassword'
AFAIK it is not
On Wed, 8 Jan 2003 08:28:58 +1100, you wrote:
hi there i am trying to build a ustom error handler for the pear db aswell
as catch fatal and parse errors , unfortunatly the pear db error message
wont give me back the file and the line where the error is, how can i
determine the line and file
On Mon, 6 Jan 2003 02:03:05 -0500, you wrote:
Is it posible to change the current uid/gid in a script that is being running
? of course, having the user and password ? like running su.
I don't believe that it's possible to do this inside PHP. I would
suggest writing a seperate script to do all
On Sat, 4 Jan 2003 19:26:02 -0500, you wrote:
Whenever the form variable is equal to 0, the value is not passed into the
corresponding variable.
For example, if isLogin = 1, then $isLogin = 1
But if isRegistered = 0 then $isRegistered = {null}
I do not understand why this happens, someone
On Sat, 4 Jan 2003 20:33:14 -0500, you wrote:
I couldn't think of isset, so I winged it:
if (strlen($var) 0) {...}
This should work most of the time, but be aware this will produce a
warning if $var isn't set (and you haven't set your error reporting
level to ignore warnings)... If you're not
On Tue, 31 Dec 2002 02:14:18 -0500, you wrote:
Thanks... thing is, it can be anything from c:\whatever.exe to
c:\program files\program name\bin\program.exe. I'll write a function
that goes to each directory in a string and does a dir /x if I have to,
but isn't there a simpler way?
I don't
On Mon, 30 Dec 2002 04:11:02 -0700, you wrote:
The things that bothered me the most:
o Pg doesn't have DATE_FORMAT()
to_char() accomplishes the same thing, for example:
select to_char(lastlogin, 'FMMM-DD- FMHH:MI AM') as lastloginf
from users;
, or the types SET and ENUM.
I'm not sure
On Mon, 30 Dec 2002 14:48:13 +0100, you wrote:
function setCurrentDevGroup($devID)
{
// start original routine
$query = SELECT dev_group FROM tracking WHERE (computer =
On Mon, 30 Dec 2002 07:57:04 -0600, you wrote:
o Pg doesn't have DATE_FORMAT()
to_char() accomplishes the same thing, for example:
select to_char(lastlogin, 'FMMM-DD- FMHH:MI AM') as lastloginf
from users;
Unless I missed something, that function doesn't work with unix timestamps.
Is
On Sun, 29 Dec 2002 18:26:01 -0800 (PST), you wrote:
This function requires the imap_stream to have been opened as the mail
administrator account. It will not work if opened as any other user.
[...]
my question is, where do i set this admin called 'mailadmin' with password
'password'. do i set it
On Sat, 28 Dec 2002 13:30:49 +0530, you wrote:
Im running a linux system so i have no problem, but how would one redirect
stderr to stdout on a Win machine, if it is possible at all g
I believe it works the same way on NT kernels (NT, 2000, XP) but I
could be wrong. A friend of mine actually
On Sat, 28 Dec 2002 02:55:44 +0530, you wrote:
I tried a simple command line script, in all cases no_file does not exist. I
do not want the command line script to show the error on the screen but to
deliver it in the variable $r. But alas, in all 3 cases i get 'rm: canoot
remove `no_file': No
On Sat, 30 Nov 2002 23:36:20 +0800, you wrote:
There is a php code from Internet, it is enable Quota function with wu-imap
server, but I can't run it into my server ( Linux Redhat system ) like
There is a mailing list that is specifically for Imp. You'd have
better luck getting answers if you
On Thu, 28 Nov 2002 17:54:46 -, you wrote:
Hello
Is it possible to detect with PHP whether an email sent using the PHP
'mail' function has bounced back or has not been delivered?
Hi,
If you're using PHP on a unix/linux with sendmail you can set the
envelope sender via the 5th parameter to
On Sun, 24 Nov 2002 17:01:21 +0900, you wrote:
Michael Sims wrote:
Then I suppose it's just an added feature of the session handler I am
using. Maybe the OP should give it a shot, as I use it and I
definitely don't have a problem with expired sessions
I'll think about writing my own
On Fri, 22 Nov 2002 14:57:23 +0900, you wrote:
[...]
1- the user logs in
2- bookmarks the page
3- closes the browser
4- opens the browser
5- goes to the saved bookmark page
He has access to the page. I.e. the session did not close/terminate when
he closed his browser ...
I 'm not where I can
On Fri, 22 Nov 2002 15:08:31 +0100, you wrote:
I don't think the session handler checks session expiry - only gc does. I
haven't checked the PHP sources yet, but I found out that on my development
server (where we definetely don't have a lot of traffic ;-) session files
can persist over night,
On Sun, 17 Nov 2002 22:08:36 -0800 (PST), you wrote:
The function imap_open() is for opening an connection to an IMAP
server. It doesn't operate directly on a file system and it is
ignorant of the actual mailbox implementation as this is all
abstracted by the IMAP protocol. Where the mail
On Sun, 17 Nov 2002 21:00:13 -0500 (EST), you wrote:
i'm looking for information on how to open mailboxes stored in user
directories using imap_open. i've lookd into the c-client documentation
as well as php.net and haven't had any luck. my experience so far is that imap_open
will
just open a
On Wed, 13 Nov 2002 20:12:44 -0500, you wrote:
When I require a file from index.php, if there's no .. on the path (a relative
path, but not going back), the relative path is from where the original file
is, but if there's a .. on the path, the relative path is from where the
symlink is
On Thu, 14 Nov 2002 01:58:49 +0200, you wrote:
So, I use php4.0.6 in default redhat installation. My code:
ini_set('session.use_cookies', FALSE);
ini_set('session.use_trans_sid', TRUE);
[snip]
TRANS SID feature doesnt working, but constant SID set
correctly (PHPSESSID=...). If I write SID in
On Tue, 12 Nov 2002 15:55:52 -0800, you wrote:
It's simple, which is one thing I like about it. My submit.php looks like
this:
?php
session_start();
header('Location: ' . $_REQUEST['target']);
[snip]
I'm curious...your redirect doesn't include the session ID, so how you
maintain
On Tue, 12 Nov 2002 18:28:53 -0800, you wrote:
[snip]
My Invisible GET method avoids all of this.
If you get an example of this up and running somewhere why don't you
post a link...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Sun, 10 Nov 2002 10:48:46 -0500, you wrote:
Hi Earnest. I found these user notes in the PHP manual, but, it's confusing
and seems to be a bit contradictory:
It's simple: A user defined error handler cannot handle parse errors
or compile time errors. That makes sense to me...if your script
On Sun, 10 Nov 2002 18:34:52 -0600, you wrote:
PS: what is the proper term for the - syntax? pointer?
In Perl it's called an infix operator. I think in PHP the technical
term for it is that - thingy... :-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Thu, 07 Nov 2002 10:45:18 +0100, you wrote:
BTW, is there any reason why PostgreSQL is not mentioned here? While it
seems there are far more MySQL installations, I personally value PostgreSQL
higher... it's OpenSource as well, it's an OO database (you may inherit,
have object identifiers,
On Tue, 5 Nov 2002 20:56:33 -0800, you wrote:
Does anyone know of a nice efficient way to convert an array of values
into a mask...
I'm going to assume that you mean a bitmask. I'm not exactly sure
what you're trying to accomplish, so I may be off base here, but let
me describe how I'm using
On Mon, 4 Nov 2002 11:59:20 +0200, you wrote:
Ok, this works.
Just one more thing,
How can I get the return in the same case as it was originally?
Use backreferences to capture what matched and use that in the replace
string. Example:
?
$search = is;
$str = This is a test, isn't it?;
$str =
On Thu, 3 Oct 2002 14:43:37 -0700 (PDT), you wrote:
Hello,
I was wondering if anyone has a good example of a way to do this. Kinda
lame, but like if the time is between 8am and 12pm, say good morning,
between 12pm and 6pm, say good afternoon, and so on.
I know this is probably pretty trivial,
On 24 Sep 2002 10:22:41 -0500, you wrote:
What I am looking for is either a way to use includes in xsl stylesheets
or something like Fusebox layouts for xml/xsl. Thank you
You may get better answers if you post this in comp.text.xml...
--
PHP General Mailing List (http://www.php.net/)
To
Chris Andrew [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I use a script which initially sends a friendly message to a browser, and
then goes about some lengthy processing. The browser is IE and I am aware
of
the 256 byte issue.
The script worked nicely in
I have a few application design questions that I was hoping someone
might have some thoughts on. I'll warn you in advance that this post
is kinda long winded. I'll try my best not to use two many trendy
buzzwords, but I may not be able to avoid it. :-)
I work for a real-estate company and one
On Sun, 22 Sep 2002 11:31:17 -0500, you wrote:
Basically, it's really easy to create multiple interfaces to the same
business logic. Don't try to make things more complicated than
necessary, and since there is no need to use multiple languages in your
implementation, that is a complexity
On Sun, 22 Sep 2002 13:07:05 -0500, you wrote:
Oh yeah, avoid that at all costs. Sounds like something like SOAP etc.
could have been an answer, but then it depends on how you write your
apps.
Well, that is basically my question. I considered both SOAP and
XML-RPC (which you mention later)
On Mon, 23 Sep 2002 00:54:07 +0200, you wrote:
?php
session_register(bunt);
phpinfo();
?
This is just a simple example. The problem is that the script produces
no output at all when called with the browser.
Is it possible that display_errors is set to Off in your php.ini?
If this were the
On Sun, 22 Sep 2002 18:45:37 -0300, you wrote:
Hello,
Hi Manuel...
Good idea, bad project. It is good that you diversify your knowlegde if
that helps your career but I think it is not a good idea to make
technology shift in a project that is already written and working well
in a certain
On Sun, 22 Sep 2002 16:40:06 -0500, you wrote:
I was just looking at my software architect book ... not half-way
through yet. Good book. CORBA is what is mentioned know, a bit
different than SOAP but I don't know enough of either yet to say for
sure.
Something like CORBA looks good to me,
On Sun, 22 Sep 2002 01:13:08 +1000, you wrote:
how can i check if an array is currently empty , for instance i have a file
input field with an array name for multiple images, i need to check if there
was no file uploaded in that field name and ignore it in the loop
I find that empty() works
On Sun, 22 Sep 2002 11:09:16 +1000, you wrote:
thats the thing , the word Array is what it returns even though there was no
input file.
Oh, I see. Without seeing your code, the best recommendation I have
is to loop through the array and remove the empty elements, then check
to see if the array
On Thu, 19 Sep 2002 00:50:56 -0400, you wrote:
By doing so I want more and more of my PHP to be purely OO. I'm fairly
aware of how to write my own classes for data but are their any frameworks
out there to do the foundation stuff already?
Have you looked at PEAR? It comes with the PHP
On Thu, 12 Sep 2002 05:21:01 +0300, you wrote:
[...]
$name = mattson-hedman # correct format is Mattson-Hedman, but user
can write in many ways. $name came from db.
so how I can convert this $name format Mattson-Hedman.
[...]
Try this:
function uc_all ($str) {
$temp = preg_split('/(\W)/',
On Fri, 06 Sep 2002 13:52:08 +1000, you wrote:
Hi,
I'd like to be able to define multiple variables within a function, and have
it available outside the function from the point the function is called...
How about this:
?
function foo()
{
return array (
foo = aaa,
bar = bbb
);
On Sat, 31 Aug 2002 14:04:11 -0400, you wrote:
And I feel foolish asking...
What is meant by 'procedural code' ???
It's the opposite of declarative code. Here's a page that briefly
explains the difference:
http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_1.html
and
On Wed, 28 Aug 2002 12:53:45 +0900, you wrote:
When I use foreach on a uninitialized array I get the following warning:
Warning: Invalid argument supplied for foreach() in
/www/htdocs/jc/cart/add_item.php on line 21
I would expect foreach to treat an unitialized variable as an empty
array
On Mon, 26 Aug 2002 01:12:56 +1000, you wrote:
However, I was hoping to use it in a similar way that I use mysql in the
above code... something like:
?
while($song = getSongByArtist(4))
{
echo song['title'];
echo song['writers'];
echo song['video'];
echo song['artist_id'];
On Sun, 25 Aug 2002 10:49:00 -0500, you wrote:
static $myrow;
if($myrow = mysql_fetch_array($result)) {
[...]
Oops. We want to remember the position of the result set, so it's
$result that should be static, not $myrow. In addition, you'll have
to put a check at the top of the function to see
On Tue, 20 Aug 2002 15:13:53 +0300, you wrote:
the problem is that from out.php I need to echo this $intext but I get:
blablabla \' blablabla
the question is.. how to fight this backslash out of there?
The magic_quotes_gpc setting is enabled on your server. If you have
access to the server
On Tue, 20 Aug 2002 14:52:21 +0300, you wrote:
Hi,
Does anyone know how to embed images in HTML emails in order to avoid a
server request (no img src=http://server/foo.img;)?
Is this possible?
It is possible. If you are sending a multipart MIME message, attach
the image as MIME type image/gif
Liam MacKenzie wrote:
Ok, I'm having a blonde day...
If $idx == 1, 4 or 9 I don't want it to echo $results.
I have this, what's the syntax to put multiple values in there?
if ($idx != 1) {
echo$results;
}
Another way to do it is by using in_array(), like so:
if
On Wed, 14 Aug 2002 01:09:32 +1000, you wrote:
I was hoping that maybe there's an opensource or commercial product out
there that I can install in my doc root (ie, PHP + MySQL support) which will
handle this in a more effective manner (ie, space the mailout across an hour
or so, etc etc).
Take
On Tue, 13 Aug 2002 21:31:22 -0400, you wrote:
Well, the only problem is, the data will be outputted into a dropdown box, so a loop
would cause duplicates of the ID.
Guess I should have mentioned that there are approx 50 ID's and they are not unique.
The only way I can think of doing it is
On Tue, 13 Aug 2002 22:14:28 -0500, you wrote:
I had some headers that were working on one server (4.0.6), but isn't
working on my (nearly) fresh install of 4.2.2. Here's the conundrum:
header(Set-Cookie: mid=$mid);
header(Location: $location);
exit;
worked just fine. I moved it
On Mon, 29 Jul 2002 17:30:48 -0400, you wrote:
Is it really necessary to store passwords encrypted in a mySQL DB for a
membership site if you're not storing sensitive info such as credit card
numbers? How much security does that offer, really, and for whom?
[...]
The reason I ask is because I'm
On Sun, 28 Jul 2002 08:18:40 +0100, you wrote:
Hi All,
[...]
I have a php script that I wish to execute but I want to put it in
index.html (not index.php)
I know there is a solution involving configuration files in either the
directory wher the file is held or specifically for the server.
On Sun, 28 Jul 2002 03:41:19 +0200, you wrote:
I have seen on some of the script-sites around some nice ways of presenting
the source code. Often in nice colors. So, the natural question is: how is
that done (cause I don't think anyone has the patience to put lt; and gt;
around all the )
On Thu, 25 Jul 2002 15:05:36 +0200, you wrote:
l for example:
l $mem='this is a test';
l preg_match('/test/', ...) should return me somehow: 10
How about this:
$mem='this is a test';
if(preg_match(/(.*)test/,$mem,$matches)) {
echo strlen($matches[1]);
}
Of course, if test occurs more
101 - 200 of 293 matches
Mail list logo