php-general Digest 28 Apr 2005 09:08:33 - Issue 3423
Topics (messages 214043 through 214062):
Re: Simple Question: Reading exec(locate) results into an array
214043 by: John Nichel
Re: editor that typesets the php code
214044 by: Rob Agar
214049 by: Richard Lynch
On Thursday 28 April 2005 08:48, William Stokes wrote:
Hello,
I need to write some sort of a user logout system for my web application.
It needs to be a solid system so that if the user presses the Logout button
there's no way of returning to the password protected area without logging
in
Hello All,
Cosider this :
function add($a=1,$b=2,$c=3){
return $a + $b + $c;
}
how do i skip the second argument while calling the function, is there
a process like this:
echo add(1,,1); # where i expect 2 to be printed,
how do i xcheive this m totally lost ! :((
Thanks,
Vedanta
Hi all.
I taught myself PHP before the frenzy over register_globals.
After a reasonable break from the language, I'm back for more.
I'm building a site where I'll be holding a lot of variables in memory
for each session. How do I do that? Apparently I can't use
session_register() if
Dear Friends,
I am just subscribe to this interesting list. I have a
question about authenticating mechanisms. I want to
implement login page which authenticate users against
defined users on Linux Redhat 9.0 on the server
machine. I don't want to define the users(in plain
text or ...).
If
Dasmeet Singh wrote:
Hi!
I have just completed coding for a script... i want to take a printout
of the code.. but the code is very hotch potch..
Is there any software to automatically set the code with proper
spacing/tabs extra..and possibly give colors to it too...??
Thanks in advance :)
session_start();
$_SESSION['somevar'] = foo;
u could also check out pear's HTTP_Session package.
On 28/04/2005, at 7:06 PM, Dan wrote:
Hi all.
I taught myself PHP before the frenzy over register_globals.
After a reasonable break from the language, I'm back for more.
I'm building a site where I'll
On 28/04/2005, at 7:16 PM, Hesam Montazeri wrote:
Dear Friends,
I am just subscribe to this interesting list. I have a
question about authenticating mechanisms. I want to
implement login page which authenticate users against
defined users on Linux Redhat 9.0 on the server
machine. I don't want to
As far as I know,
it's not true you can't use session variables if register_globals is
off,
the difference is that you must acces session variables using
$_SESSION['variablename'], that's is an assurance that a session
variable is a REAL session variable, and that it is not set using for
Hi,
Is there a way to restrict a password manager (Save password for this
site...) window pop-up? I have a form which shows a user a lost login
if correct password and some other data was provided and browser asks
user if it is necessary to save this password entry.
Obviously, there is no need
Hello Michael,
Thursday, April 28, 2005, 11:01:48 AM, you wrote:
MK Is there a way to restrict a password manager (Save password for
MK this site...) window pop-up? I have a form which shows a user a
MK lost login if correct password and some other data was provided
MK and browser asks user if
Hi,
I have this simple piece of code that worked like a chram in PHP 4.x
Now that i've moved to PHP 5 it doesn't work anymore.
I always get 0 for $form_ok even if all fields are filled.
The variables come from a form in a previous page.
Any ideas on where the problem might be ?
I have
Do you set this vars before somewhere in the code? Because if you get
some datas from a from you have to use $_POST/$_GET to get the values...
Hi,
I have this simple piece of code that worked like a chram in PHP 4.x
Now that i've moved to PHP 5 it doesn't work anymore.
I always get 0 for
-Original Message-
From: Mário Gamito [mailto:[EMAIL PROTECTED]
Sent: 28 April 2005 11:36
To: php-general@lists.php.net
Subject: [PHP] Code stoped working after upgrading from 4 to 5
Hi,
I have this simple piece of code that worked like a chram in
PHP 4.x Now that i've moved
Mário Gamito wrote:
Hi,
I have this simple piece of code that worked like a chram in PHP 4.x
Now that i've moved to PHP 5 it doesn't work anymore.
I always get 0 for $form_ok even if all fields are filled.
The variables come from a form in a previous page.
Any ideas on where the problem might be ?
Dear Friends,
Correct me if I am wrong here you should check out
either using
htaccess htpasswd which uses a PAM link or LDAP. Or
trying using pear's
Auth package which connects to ldap.
Thanks Dan for your answer but I could not understand
the comments. If possible, please provide me the
Wow, nice to hear from the guy who created PHP! :)
I need to make 2 things clearer though:
1. First I want to know how to make the actual binary file that is written,
to be encoded as UTF-8. This is my PRIMARY question.
2. How to have fwrite write the file without the BOM. (to make it
I have an object class in which I'm doing chr() calls, especifically in the
definition of some variables, and when loading the class I get this error:
Parse error: parse error, unexpected '(', expecting ',' or ';' in Ticket.inc
on line 51
Line 51 has:
var $textoInicio = chr(27) . chr(64);
Vedanta Barooah wrote:
Hello All,
Cosider this :
function add($a=1,$b=2,$c=3){
return $a + $b + $c;
}
how do i skip the second argument while calling the function, is there
a process like this:
echo add(1,,1); # where i expect 2 to be printed,
php does not support this. you can workaround
function add ($a=1, $b=2, $c=3) {
return $a + $b + $c;
}
add(1, null, 1);
will do just fine
r.,
Bostjan
On Thursday 28 April 2005 14:16, Marek Kilimajer wrote:
Vedanta Barooah wrote:
Hello All,
Cosider this :
function add($a=1,$b=2,$c=3){
return $a + $b + $c;
}
Bostjan Skufca @ domenca.com wrote:
function add ($a=1, $b=2, $c=3) {
return $a + $b + $c;
}
add(1, null, 1);
will do just fine
returns 2, OP wants 4 IMO
r.,
Bostjan
On Thursday 28 April 2005 14:16, Marek Kilimajer wrote:
Vedanta Barooah wrote:
Hello All,
Cosider this :
function
I'm trying to get pear up and running, and I can't get it to work.
I've tried it on a couple of different systems:
fedora c2 and c3 with php 4.3.10
I can run pear from the shell, install new modules (pager,
html_quickform,...) but when ever I try using any pear code in a php script
with the
El Jue 28 Abr 2005 17:23, Kelly Meeks escribió:
I'm trying to get pear up and running, and I can't get it to work.
I've tried it on a couple of different systems:
fedora c2 and c3 with php 4.3.10
I can run pear from the shell, install new modules (pager,
html_quickform,...) but when
Martín Marqués wrote:
I have an object class in which I'm doing chr() calls, especifically in the
definition of some variables, and when loading the class I get this error:
Parse error: parse error, unexpected '(', expecting ',' or ';' in Ticket.inc
on line 51
Line 51 has:
var $textoInicio =
Giulio wrote:
As far as I know,
it's not true you can't use session variables if register_globals is off,
the difference is that you must acces session variables using
ALWAYS CALL session_start() BEFORE TRYING TO USE THE $_SESSION SUPERGLOBAL!
also I don't quite see the connection with
El Jue 28 Abr 2005 09:42, Jochem Maas escribió:
Martín Marqués wrote:
I have an object class in which I'm doing chr() calls, especifically in
the
definition of some variables, and when loading the class I get this error:
Parse error: parse error, unexpected '(', expecting ',' or ';' in
On 4/28/05, Richard Lynch [EMAIL PROTECTED] wrote:
I'm betting dollars to doughnuts that you've got a newline at the end of
$sql1 which is messing you up.
You're right! Give that man a doughnut! When I tested the query in
Query Analyzer. I hit [Enter] to format the query and make it
readable,
Martín Marqués wrote:
El Jue 28 Abr 2005 09:42, Jochem Maas escribió:
Martín Marqués wrote:
I have an object class in which I'm doing chr() calls, especifically in
the
definition of some variables, and when loading the class I get this error:
Parse error: parse error, unexpected '(', expecting
1. First I want to know how to make the actual binary file that is written,
to be encoded as UTF-8. This is my PRIMARY question.
I think this part is the key. If the string originated from your text editor,
then your text editor needs to be in UTF-8 mode. If you are importing the
data from a
Mark Sargent wrote:
big snip
Hi All,
ok, so let me understand this. To be able to use GET/POST and some
others, I need this turned on, yes..? Do you all have it set to on..? If
no, how do you get around this..? Cheers.
No. With globals off, php just doesn't _magically_ transform
Hello, can you please help me send an html email using php instead of
just simple text output. I'm trying to have the user fill out a form (
https://www.smilerochester.com/medical_form.html ) and have the exact
same form emailed to me with the same pretty format of a form instead of
just a
Dan wrote:
Hi all.
I taught myself PHP before the frenzy over register_globals.
After a reasonable break from the language, I'm back for more.
I'm building a site where I'll be holding a lot of variables in memory
for each session. How do I do that? Apparently I can't use
session_register() if
Hello Giuseppe,
Thursday, April 28, 2005, 2:22:20 PM, you wrote:
CG Hello, can you please help me send an html email using php instead of
CG just simple text output. I'm trying to have the user fill out a form (
CG https://www.smilerochester.com/medical_form.html ) and have the exact
CG same
Carraccia, Giuseppe wrote:
Hello, can you please help me send an html email using php instead of
just simple text output. I'm trying to have the user fill out a form (
https://www.smilerochester.com/medical_form.html ) and have the exact
same form emailed to me with the same pretty format of a
Well that was simple, but this is what i am trying to solve:
if you refer to the php documentation for ldap_open() function it says:
resource ldap_search ( resource link_identifier, string base_dn,
string filter [, array attributes [, int attrsonly [, int sizelimit [,
int timelimit [, int
btw! saying:
add($a=null,$b=null,$c=null)
is as good as saying:
add($a,$b,$c)
thanks,
vedanta
On 4/28/05, Vedanta Barooah [EMAIL PROTECTED] wrote:
Well that was simple, but this is what i am trying to solve:
if you refer to the php documentation for ldap_open() function it says:
Vedanta Barooah wrote:
btw! saying:
add($a=null,$b=null,$c=null)
is as good as saying:
add($a,$b,$c)
No, it's not. Because in this case $a, $b and $c are all uninitialized
variables and (if this is a function definition) then you *have* to
supply $a $b and $c parameters.
Even if you were
the code below was talking of function declarations ... reffer to the thread.
will code injection in case of function declarations work? I am not sure!!
;)
?php
function add($a,$b,$c){
return $a+$b+$c ;
}
echo add(2,null,3);
# even if you pass the value of $b in the url as
Please do not reply to me personally. I will usually read your
responses in the newsgroup.
Vedanta Barooah wrote:
the code below was talking of function declarations ... reffer to the thread.
will code injection in case of function declarations work? I am not sure!!
OK. But even so
Hello Jason,
Thursday, April 28, 2005, 3:25:10 PM, you wrote:
JB ?php
JB /** Page called with ?a=22 appended to URL */
JB function add($a,$b,$c) {
JBreturn $a+$b+$c;
JB }
JB $total = add($first, $second, $third);
JB /** You think this will be 0, but with register_globals this is actually
RD As that code stands, even with register globals on, it will not echo
RD 22. At least on PHP 4.3.11 on my server this is the case. I guess RG
RD makes all variables global, but not super-global, which leaves the
RD above safe as the null of $total overrides whatever may have been set.
Err,
* Dan [EMAIL PROTECTED]:
I taught myself PHP before the frenzy over register_globals.
After a reasonable break from the language, I'm back for more.
I'm building a site where I'll be holding a lot of variables in memory
for each session. How do I do that? Apparently I can't use
Richard Davey wrote:
RD As that code stands, even with register globals on, it will not echo
RD 22. At least on PHP 4.3.11 on my server this is the case. I guess RG
RD makes all variables global, but not super-global, which leaves the
RD above safe as the null of $total overrides whatever may have
Hello Jason,
Thursday, April 28, 2005, 4:23:43 PM, you wrote:
JB Indeed... and replace ?a=22 with ?first=22 in my message as well.
JB :-/
Heh.. ok :)
No worries, demonstrated to me that RegGlobs aren't quite as
destructive as popular myth would lead you to believe (not that it'll
make me start
Hi all,
What templating engines do you use with php and why?
Ive been using smarty (http://smarty.php.net)
Clive.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 4/28/05, Clive Zagno [EMAIL PROTECTED] wrote:
What templating engines do you use with php and why?
I use eval(). Because it works.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Richard Davey wrote:
Hello Jason,
Thursday, April 28, 2005, 4:23:43 PM, you wrote:
JB Indeed... and replace ?a=22 with ?first=22 in my message as well.
JB :-/
Heh.. ok :)
No worries, demonstrated to me that RegGlobs aren't quite as
destructive as popular myth would lead you to believe (not that
Clive Zagno wrote:
Hi all,
What templating engines do you use with php and why?
Ive been using smarty (http://smarty.php.net)
Clive.
PHP itself is a templating engine, i.e. it can be used to filter input
and format it into output. But Smarty is nice if you want your people
to be able to create
Greg Donald wrote:
On 4/28/05, Clive Zagno [EMAIL PROTECTED] wrote:
What templating engines do you use with php and why?
I use eval(). Because it works.
I'm a big fan of include(). ;)
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List
* Clive Zagno [EMAIL PROTECTED]:
What templating engines do you use with php and why?
Ive been using smarty (http://smarty.php.net)
Just FYI, you've opened the door for a holy war, as temlating and
template engines are a fairly volatile topic, with many people holding
very extreme opinions on
The yes part is that it only appears based on the
browsers intelligence in scanning the name of your
form fields. Change username and password to
something, well.. more obtuse, and it often
gets rid of the problem. Give it a shot and see
which combination works for you.
You may
Greg Donald wrote:
On 4/28/05, Clive Zagno [EMAIL PROTECTED] wrote:
What templating engines do you use with php and why?
I use eval(). Because it works.
Myself, I'm partial to include(). ;)
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List
Hello -k.,
Thursday, April 28, 2005, 5:11:26 PM, you wrote:
k You may also try adding autocomplete=Off into your password input
k tag.
Yes.. providing you have no intention of making your markup validate
(as transitional or strict) - but I guess lots of people don't, so
it's a valid method.
Hi,
I dont mind seeing php and html together, but designer generally hate
it, so I would want to seperate php code from html as much as possible.
clive
Jason Barnett wrote:
Clive Zagno wrote:
Hi all,
What templating engines do you use with php and why?
Ive been using smarty
I'm a big fan of include(). ;)
Ditto!
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: 4/27/2005
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ive been using smarty (http://smarty.php.net)
Just FYI,
you've opened the door for a holy war, as temlating and
template engines are a fairly volatile topic, with many people holding
very extreme opinions on the subject.
(me? I use Smarty.)
--
Matthew Weier O'Phinney
So just
Ryan A wrote:
So just because you use smarty you think you are smart and have the right to
be smart..who the hell do you think you are??
Sorry, just giving an example of how a jackass with extreme opinions would
write on this holy war's volatile topic. no offense meant
:-)
Cheers,
Ryan
I
On 4/28/2005 7:08:00 PM, Evert | Rooftop Solutions
([EMAIL PROTECTED]) wrote:
Ryan A wrote:
So just because you use smarty you think you are smart and have the right
to be smart..who the hell do you think you are??
Sorry, just giving an example of how a jackass with extreme opinions
would
well, i'm not sure what to do after your code is done, but as far as
editors go, theres a free one out there that does syntax highlighting
for a ton of languages (php included) called Vim... it comes with a
graphical version called gvim that i do all of my coding on. no
debugging features for php
On Thu, 2005-04-28 at 13:20, Ryan A wrote:
On 4/28/2005 7:08:00 PM, Evert | Rooftop Solutions
([EMAIL PROTECTED]) wrote:
Ryan A wrote:
So just because you use smarty you think you are smart and have the right
to be smart..who the hell do you think you are??
Sorry, just giving an
Ive been using smarty (http://smarty.php.net)
Just FYI,
you've opened the door for a holy war, as temlating and
template engines are a fairly volatile topic, with many people holding
very extreme opinions on the subject.
(me? I use Smarty.)
So just because you use smarty you think you are smart
Vedanta Barooah wrote:
Well that was simple, but this is what i am trying to solve:
if you refer to the php documentation for ldap_open() function it says:
resource ldap_search ( resource link_identifier, string base_dn,
string filter [, array attributes [, int attrsonly [, int sizelimit [,
int
well, i'm not sure what to do after your code is done, but as far as
editors go, theres a free one out there that does syntax highlighting
for a ton of languages (php included) called Vim... it comes with a
graphical version called gvim that i do all of my coding on. no
debugging features for php
I would go for a xml-style template engine (start flaming right below
this thread)
Flaming??? who has time to start flaming after reading what you wrote?
am busying banging my head against the wall.
To state the obvious... the above is in actuality a flame disguised as
an excuse.
/*
Mind you I don't post much at all anymore since I became a father a year
and a half ago... priorities you know :)
*/
Almost forgot, congrats on your kid.
Cheers,
Ryan
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.4 -
At 5:43 PM -0800 4/28/05, Clive Zagno wrote:
Hi all,
What templating engines do you use with php and why?
Ive been using smarty (http://smarty.php.net)
I've used include(), and smarty, but now use Expression Engine
http://www.pmachine.com. EE which is more of a CMS than just a
templating system,
Is it just me or is joking becoming outlawed on the list? Most of us are
geeks or classified as
geeks on the lista little geek humour please? programming is a serious
business and i find myself
getting quite stressed sometimesusing a little humour or reading others
humourous replies helps
Jason Barnett wrote:
snip
Humor is on my TODO list.
Making a TODO list is on my TODO list.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 4/28/2005 8:05:31 PM, John Nichel ([EMAIL PROTECTED]) wrote:
Jason Barnett wrote:
snip
Humor is on my TODO list.
Making a TODO list is on my TODO list.
hehe
used to be on mine too, then I finally made a TODO list and now I have a
TODO reminder to do the things on my TODO
[snip]
Jason Barnett wrote:
snip
Humor is on my TODO list.
Making a TODO list is on my TODO list.
[/snip]
Now, I know that we all love to discuss small dogs from Kansas, but I've
too much to do right now.
TYVM!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Thursday 28 April 2005 02:05 pm, John Nichel wrote:
Jason Barnett wrote:
snip
Humor is on my TODO list.
Making a TODO list is on my TODO list.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
Just out of curiosity, are there any templating engines out there
Does anyone have any references on using PHP and Ajax? I caught the
news on PHP Architect about the webcast they are doing in May and it
sounds like an interesting technology, but I can't wait, of course
:)... and I wanted to learn as much as I could before their
presentation.
Any pointers?
Andre Dubuc wrote:
On Thursday 28 April 2005 02:05 pm, John Nichel wrote:
Jason Barnett wrote:
snip
Humor is on my TODO list.
Making a TODO list is on my TODO list.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
Just out of curiosity, are there any
Jeremiah Johnson mailto:[EMAIL PROTECTED]
on Thursday, April 28, 2005 11:28 AM said:
Does anyone have any references on using PHP and Ajax? I caught the
news on PHP Architect about the webcast they are doing in May and it
sounds like an interesting technology, but I can't wait, of course
Hello, This is a new install of PHP 5.0.4 on XP, I'm testing if it's
installed correctly with the usual test.htm:
form action=action.php method=POST
Your name: input type=text name=name /
Your age: input type=text name=age /
input type=submit
/form
Action.php:
?php
echo $_POST['name'];
Ryan A wrote:
I would go for a xml-style template engine (start flaming right below
this thread)
Hey Rob,
I sorry for the mix up but the above (however obvious) was *not* meant to
be
a flame, I was *only* joking with the guy.
Is it just me or is joking becoming outlawed on the list?
From: Rob Kapfer [mailto:[EMAIL PROTECTED]
Hello, This is a new install of PHP 5.0.4 on XP, I'm testing if it's
installed correctly with the usual test.htm:
form action=action.php method=POST
Your name: input type=text name=name /
Your age: input type=text name=age /
input
Evert | Rooftop Solutions wrote:
Yes, and that's how I read this reply =)
About the subject,
I'm working on a xml-based templating system, which caches all the steps
it does, so it overcomes the slowness =)
And ofcource because I like xml and all the neith things you can do with
it.
grt,
Evert
Also see:
http://php.net/manual/en/function.array-key-exists.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 4/28/2005 8:18:28 PM, Andre Dubuc ([EMAIL PROTECTED]) wrote:
On Thursday 28 April 2005 02:05 pm, John Nichel wrote:
Jason Barnett wrote:
snip
Humor is on my TODO list.
Making a TODO list is on my TODO list.
--
John C. Nichel
ÜberGeek
KegWorks.com
Rob Kapfer wrote:
Hello, This is a new install of PHP 5.0.4 on XP, I'm testing if it's
installed correctly with the usual test.htm:
form action=action.php method=POST
Your name: input type=text name=name /
Your age: input type=text name=age /
input type=submit
/form
Action.php:
?php
echo
/*
I'm working on a xml-based templating system, which caches all the steps
it does, so it overcomes the slowness =)
And ofcource because I like xml and all the neith things you can do with it.
*/
Sounds like you are pretty good with xml... i know very little of XML, do
you
have a link I can read
[snip]
Jason Barnett wrote:
snip
Humor is on my TODO list.
Making a TODO list is on my TODO list.
[/snip]
Now, I know that we all love to discuss small dogs from Kansas, but I've
too much to do right now.
TYVM!
Hey Jay,
Just wanted to tell youone of your snip
On Thursday 28 April 2005 03:21 pm, Ryan A wrote:
On 4/28/2005 8:18:28 PM, Andre Dubuc ([EMAIL PROTECTED]) wrote:
On Thursday 28 April 2005 02:05 pm, John Nichel wrote:
Jason Barnett wrote:
snip
Humor is on my TODO list.
Making a TODO list is on my TODO list.
There is a good intro to the whole XMLHttpRequest (Ajax) process on
Webmonkey right now:
http://webmonkey.wired.com/webmonkey/05/16/index4a.html
Good for those of us slower on the uptake...
jason sweeney
jason.designshift.com
Chris W. Parker wrote:
Jeremiah Johnson mailto:[EMAIL PROTECTED]
[snip]
[snip]
Jason Barnett wrote:
snip
Humor is on my TODO list.
Making a TODO list is on my TODO list.
[/snip]
Now, I know that we all love to discuss small dogs from Kansas, but
I've
too much to do right now.
TYVM!
Hey Jay,
Just wanted to tell youone of
/*
I'm working on a xml-based templating system, which caches all the steps
it does, so it overcomes the slowness =)
And ofcource because I like xml and all the neith things you can do with it.
*/
Sounds like you are pretty good with xml... i know very little of XML, do
you
have a link I can read
[snip]
and box of bending straws.
[/snip]
Nice.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jay Blanchard wrote:
snip
Note the coding style of the open snip tag, I believe that would be
Jason's
Gestooberhanken!
/snip
Btt. Awww, sorry, but you do not win the grand prize.
However, we do have some nice parting gifts for you. Tell him what he's
won Chuck.
Well John, for Jay
I realize this is a dumb question but I just can't come
up with an equation that will do this and I don't see an
internal PHP function (for version 4.3) that will do this...
Basically I need to come up with an equation/algorithm
that will round any number up/down to the nearest X.
I tried using
y
On 4/28/05, Chris Boget [EMAIL PROTECTED] wrote:
I realize this is a dumb question but I just can't come
up with an equation that will do this and I don't see an
internal PHP function (for version 4.3) that will do this...
Basically I need to come up with an equation/algorithm
that will round
Its a long story, but basically, theres some code we cannot get around that
is taking anchor tags such as a href=#sat and turning them into a
href=http://host.com/folder/file.html?var=varvar2=var2#sat.
I need to undo this action with a pattern match on a large body of content
with . Can this
I think the formula you are looking for is something like this:
round( y/x, 0) * x
With y being your number and x being the nearest increment number to
round to.
On Apr 28, 2005, at 4:10 PM, Chris Boget wrote:
I realize this is a dumb question but I just can't come
up with an equation that will
On Thu, 28 Apr 2005, php wrote:
Its a long story, but basically, theres some code we cannot get around that
is taking anchor tags such as a href=#sat and turning them into a
href=http://host.com/folder/file.html?var=varvar2=var2#sat.
I need to undo this action with a pattern match on a large body
On 4/28/05, Greg Donald [EMAIL PROTECTED] wrote:
do {
$num++;
} while( $num % 500 );
Actually that fails for the base number 500. This works for everything:
#!/usr/bin/php
?php
$num = isset( $_SERVER[ 'argv' ][ 1 ] )
? $_SERVER[ 'argv' ][ 1 ]
: 0;
if( $num % 500 )
{
do {
I realize this is a dumb question but I just can't come up
with an equation that will do this and I don't see an
internal PHP function (for version 4.3) that will do this...
Basically I need to come up with an equation/algorithm that
will round any number up/down to the nearest X.
I
im looking for a small tutorial/cms script without all the fluff.
something to create pages (static preferably) doesn't even need an
admin/user interface.
i could write my own, but don't have the time at the moment.
if anyone knows of such a small script let me know.
cheers.
--
PHP General
On Thu, 2005-04-28 at 13:53, Ryan A wrote:
I would go for a xml-style template engine (start flaming right below
this thread)
Flaming??? who has time to start flaming after reading what you wrote?
am busying banging my head against the wall.
To state the obvious... the
I have a request from a client that has me a little confounded. He wants to
have a system where when someone posts a public request with certain
criteria, that criteria is then used to find established profiles/agents
that fit the criteria. Then emails are sent out to the people corresponding
to
Yes. It's using the global arrays HTTP_POST_VARS and HTTP_SESSION_VARS
arrays, and 4.3.x has the directive register_globals set to off by
default. It's safer to leave it off. You can easily update the script by
replacing these with $_POST and $_SESSION, respectively.
Again I appreciate the
1 - 100 of 120 matches
Mail list logo