Egon Schmid wrote:
>From: "Enrico Weigelt" <[EMAIL PROTECTED]>
>
>
>Please note, there are many German PHP developers. Most of them are
>not so stupid ...
>
I must say I fail to understand both the meaning and the reason for the
harsness in your reply.
Bogdan
--
PHP General Mailing List (h
[EMAIL PROTECTED] wrote:
> I think this is a nice idea for php8 (or some release, I´ll never have
> to use)
> The main thing in using php is that it is close to c.
> As there are so many new functions, some of them are not really
> necessary,
> I would not prefer shortcuts like these. Who shoul
You don't have to rawurlDEcode again - that's done automatically. You
have to encode so you're HTTP compliant, but the decoding is done by PHP
(or even Apache? I'm not sure) when receiving urlencoded strings via URL
and form data.
Bogdan
andy wrote:
>Hi there,
>
>I am trying to fill a form a
Jason Wong wrote:
>Well your problem is not caused by the rawurlencode, rawurldecode. It's
>probably because you have magic_quotes_gpc set to on.
>
>Try this:
>
>For your URL: rawurlencode(stripslashes($subject)), and same for $message.
>
>For your textarea: htmlspecialchars($subject), & $messa
As replied above, or
echo(round($money*100)/100);
Just to point out another way - the previous suggestions are better
because they most probably involve way less math on the server.
Bogdan
Ian Wayne wrote:
>Hi all.
>
>I can't believe I'm stuck on this - seems to me there ought to be an easy
Hi!
You may want to check out the tempnam() function -- it's under filesystem
functions in the downloadable documentation.
Bogdan
> hallo,
>
> my applications generates a html-page, with a link to an image.
> this image is created by the application, and should exist only temporarily
> - so it
On the other hand if you want to keep track of the number of files generated
you might want to try something like this:
$i=1;
$thePath=$temp_dir."/$fileprefix";
while (file_exists($thePath.$i))
{
$i++;
}
$thePath.=$i;
($thePath stores a valid temp fil
There was a similar thread on the Midgard mailing list not long ago -- you
may want to take a look for possible solutions:
http://marc.theaimsgroup.com/?l=midgard-user&m=100653565721944&w=2
> Hi,
> How to open an existing excel file(.xls) from PHP, and edit the
> contents of the particul
Had the same problem not long ago and I didn't find a simple solution
either. My solution at the time was the painfully slow one - walking the
array and storing strlen for both key and value. Since you have a large
array, this probably doesn't do for you.
A faster but less accurate solution would
If you work under Linux you might want to check out the man page for mogrify
and perform an for
example.
Bogdan
> Please help me. I need convert image from tif format to the jpg format,
> exist any php function to do this ?
>
> Thank you
>
> Roman
--
PHP General Mailing List (http://w
Sounds quite odd - you may try an "echo(serialize($g_months))" in the
function and see what you get... It may be that the code generating the
option box has problems - this way you make sure $g_months is empty indeed.
Bogdan
Jason Rennie wrote:
> Hi all,
>
> I've got an array in the global scop
The first thing that comes to mind - if you say it's working with local variables
- is trying to set it local prior to using it (i.e. insert a
"$loc_months=$g_months" just below "global $g_months" and use the local variable
from then on).
It may be a bug in your PHP - walking an array with each p
if ($i<10) { $i="0".$i } ? :-)
phantom wrote:
> I would like to format numbers to be a fixed width.
>
> I want all numbers to be 2 characters in width to the left of the
> decimal point.
>
> 1 should be 01
> 2 should be 02
> 3 should be 03
>
> How can I do this?
>
> --
> PHP General Mailing List
Why is this needed in this case an not for local variables? You probably are right,
I don't imply you aren't, but why is a reset needed in local scope when using
global variables? Is it possible to start an each() in a function and continue it
in another for global arrays?
Philip Hallstrom wrote:
Hi everybody!
Two things I consider urban myths about PHP (plus MySQL) - please let me
know what you think of these:
1. The evil global variables
Ok, the classic
is obviously valid. But let's be serious, who codes this? The example
code is valid and it's easily crackable indeed, but you don't
Inadvertedly sent to me:
Bas van Rooijen wrote:
> sprintf("%02d", $i);
>
> but you should indeed check out how this function works..
>
> >phantom wrote:
> >
> >> I would like to format numbers to be a fixed width.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAI
Well, you can always code in a little Javascript, such as
"window.location='#lastpos'"...
Leland wrote:
> I tried generating a in the orginal list, but I haven't
> been able to create the return link on the other page that will refrence
> this. I tried Link but it doesn't
> work.
>
> Any ideas
Philip Hallstrom wrote:
> > A definite possibility, but it does depend on the hacker in question
> > knowing exactly how your script is written...
>
> True, but in a shared hosting environment this is very likely.
...not to mention open source code. However, the discussion was indeed oriented
to
Well, the official point is rather obvious from my original e-mail. What I
personally do is either forget about it -- again, see the original e-mail --
or, if for some reason high security is needed, I simply add 0 (zero) to
numeral input fields and addslashes to strings.
Bogdan
[EMAIL PROTECTED
> > > True, but in a shared hosting environment this is very likely.
> >
> >...not to mention open source code.
>
> Oh yeah. Guess I had a mental lapse there. If you are using, say, a
> script downloaded from freshmeat.net and it happens to be poorly secured
> then obviously the entire free worl
> > > Oh yeah. Guess I had a mental lapse there. If you are using, say, a
> > > script downloaded from freshmeat.net and it happens to be poorly secured
> > > then obviously the entire free world is going to know how to exploit your
> > > copy of itduh
> >
> >Actually that's exactly what
This is your problem -- what do you expect this line to do?
> $sid (login($user, $pass));
Bogdan
--
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:
Embed as in...? To my knowledge there is no way to embed a PDF in a web page -
you can see a PDF from the browser, but I don't know how a PDF could be
embedded within an actual HTML page.
Bogdan
Webleycity wrote:
> Does anybody out there know how to embed pdf in a web page
--
PHP General M
Or, better yet, try "From: XYZ company ";
Bogdan
Alex Vargas wrote:
> That's because XYZ company isn't a valid email address and sendmail fixes
> the address with the name of the server. If you'd put
> [EMAIL PROTECTED], you'd see that address unchanged.
>
> Alex.
>
> - Original Message ---
Why do you need this? To my knowledge you get the same behaviour with
Bogdan
Emile Bosch wrote:
> Dear list,
> Does anyone know how the internals of create function works?
>
> $test = create_function('blah','$arg,$arg2',$code);
>
> Does it really create the function in $test; or creates it a
while ($row = mysql_fetch_array($result))
{
echo $row["name"];
list($checked)=mysql_fetch_row(mysql_query("select user_id from User_Category where
user_id='$current_user' and category_id='".$row["category_id"]."'"));
$checked=$checked?" checked":"";
echo '';
}
Hope this helps.
Ummm, though of this after I sent the e-mail: you may even perform the line after
list($checked)... with an if in the query and skip the line altogether. But that may
be a little too much... :-)
Bogdan
Bogdan Stancescu wrote:
> while ($row = mysql_fetch_array($result))
> {
>
Or, to actually prove your point in the original e-mail (I checked it and
you're right):
If you now try it won't do anything -- as you said, is the proper code.
Something worth mentioning is that even if you do
the former version won't work.
Bogdan
> $test='htmlspecialchars';
> echo $te
Yes, that's a very good one I didn't think of!
> One thing that I do know is dangerous is deleting rows based on an
> integer field with an unprocessed value;
> Ca-Boom! The entire table has been deleted. Don't you feel dumb!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-
JavaScript doesn't implement any kind of one-way hashing. But that's for a
good reason: suppose JavaScript encoded your password and sent it encoded to
the server. The in-between hacker would retrieve the encoded password as it
is sent to the server and simply pass that as the password - he do
As a side note, that's obviously the most insecure part of entering the
password because it's the only time you enter the password. :-)
> > The most insecure part of entering a password in a web
> > form is when you click "submit" and your password is
> > sent in plain text form to your next PHP
Yes - implement the Nike solution: Just do it! You have no problems, simply
insert the data from the input box in the table. You may want to display the
results with nl2br() so you can see the line breaks in HTML afterwards.
Bogdan
Robin McKenzie wrote:
> I am storing comments in a MySQL db, an
To be exact,
update table messages set views=views+1 where id=$msg_id
Bogdan
Bas Jobsen wrote:
> UPDATE $table views=views+1
>
> > picked up is counted!! Can anyone guide me as to how
> > this can be achieved?
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAI
Why do you draw the conclusion you're misunderstood? We are unable to answer
your question about speed -- so aren't we allowed to have a separate discussion
derrivated from your question?
Bogdan
Emile Bosch wrote:
> thx for al the help but i need some help of a php developer i guess cuz i am
>
Check these out:
http://www.horde.org/imp/
http://twig.screwdriver.net/
Also, make sure you search Google for security problems on them - I think IMP
used to have some, but they seem to have fixed them since.
"M.E. Suliman" wrote:
> Hi
>
> I need to create a way for users to a site to check exi
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 initializin
Just a suggestion: use exec("ls -1 root/articles/??_head.xml",$article_files) to
find out the files -- then walk $article_files, parse the file and echo whatever
you please. :-)
Bogdan
Martin Hughes wrote:
> Heya,
>
> Can PHP count the number of a certain ftile in a directory and then print
> t
Make sure you close the accolade afterwords in PHP -- other than that, yes,
it works just fine!
For example this should work just fine:
-
Found a multiple of three!
--
Bogdan
Robert Dyke wrote:
> Hello:
>
> In ASP I can write a Conditional statement like this:
>
> <% If $va
Took a better look at your code -- you've capitalized "true" -- that may be
it.
Bogdan
--
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]
I do the same with is_file() in several scripts and it works just fine
without clearing the cache. Don't know about dirs but I can't see why it may
be different - should use the exact same functions internally.
On a side note, I'd rather recommend using a loop like
This way you have better cont
Forgot a couple of double quotes and the mode for mkdir. Perfectionist, you
see... :-)
Bogdan
--
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 PRO
Try in_array('pattern',array('')) and in_array(1,array(0)). The quirk you
found is predictable, as we know how PHP behaves when converting strings to
integer values... And 'pattern' evaluates to 0 -- '55pattern' for example
doesn't match -- but then again, what kinda word is that? :-)
HTH
Bogdan
RTFM: http://www.php.net/manual/en/language.types.type-juggling.php
Peter Vereshagin wrote:
> Bogdan Stancescu wrote:
> >
> > Try in_array('pattern',array('')) and in_array(1,array(0)). The quirk you
> > found is predictable, as we know how PHP behav
http://www.htdig.org/
Martin wrote:
> Hello! Does anybody know a good script to search the own web-server?!
> Would be nice if the script could display the whole sentence where the
> word was found...
>
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [E
This is a kind of a "shit happens" answer -- ummm... nope, there's no
workaround. The only workaround is providing a global path variable and use that
for all pages, but you probably already thought about that. Sorry for the bad
news on Christmas! :-)
Bogdan
"Arcadius A." wrote:
> Hello !
> I'
// speaking of comparing versions.
// Usage example:
// if (!isphpver("4.0.2"))
// {
// [do something]
// }
// Bogdan Stancescu <[EMAIL PROTECTED]>, November 2001
function isphpver($minver)
{
$itis=2; // That is, undecided
$minimum=explode(".",$m
Hello list,
I'm developing a library and would need to know if the code calling my
library has already started a MySQL transaction or not. I want to know
whether I should start one or use savepoints instead -- starting a
transaction if one is already in progress commits the existing
transaction, a
On 24-Apr-09 03:45, Chris wrote:
> I don't think mysql has any way of finding that out. If you're using an
> abstraction layer, it's easy enough in code - though rollback's are a
> little harder - should they do a complete rollback or just to a savepoint?
Thank you for taking the time to sketch th
Hello all,
I guess this comes up once in a while, does anybody know how I can find
the current PHP sessions' IDs? I don't mind if some have passed away,
and the PHP gc hasn't run yet, because I'm doing a garbage collection of
my own, for data identified by session ID -- it doesn't really matter
You probably mis-typed something:
[EMAIL PROTECTED] ~]$ php
Content-type: text/html
X-Powered-By: PHP/4.3.11
is 0
Cheers,
Bogdan
Erwin Kerk wrote:
Hi All,
Can anyone explain me why the following code:
if ("info" == 0) echo "is 0\n"; else echo "not 0\n";
Results in: not 0
Whereas:
if ("inf" == 0) e
n.php#AEN129461}
* PHP session.save_handler='files'
*
* @author Bogdan Stancescu
* @license http://opensource.org/licenses/lgpl-license.php GNU Lesser
General Public License
*
* @return mixed false on error or the indexed array of the session IDs;
* please note that the session IDs are 16-
Marek Kilimajer wrote:
Bogdan Stancescu wrote:
Ok, I went with the solution you recommended, by the way of a "thank
you" to the list, here's the resulting function:
/**
* This function returns the IDs of the current PHP sessions.
* At this time, it only works with
* [EMAIL
Apart from Marek's reply, you should probably check the in_array()
documentation (look at the third, optional parameter) and search for
type casting on php.net.
Cheers,
Bogdan
Ing. Ivo F.A.C. Fokkema wrote:
Hi guys and gals,
I'm not screaming "Bug! Bug!" but this _does_ look 'illogical' to me. I
Hello Rafael,
You can try using output control functions (see
http://ro.php.net/manual/en/function.ob-start.php) and, depending on
whether you want to upload the file or save it on your server (I don't
understand which from your message), serve the result with a
"Content-type: text/plain" hea
301 - 354 of 354 matches
Mail list logo