Hi,
I want call the current page and set a variable (or call a function)
< a href="index.php?variable=bananas" -this works but means I have to change
it for every page name
I have tried
this is the link
Only works within a tag.
Any ideas - no javascript solutions that is what I am trying to
Dan Rossi wrote:
Hi there, i was wondering how I could allow access to a script from
another server/host only ? Its prob a silly question but i guess get
their host ip ? The thing with that is one server which is a webpage has
a javascript popup to load the script on the other server, and i bel
Hi currently i have a problem with viewing chinese characters that is passed
to me in binary format.. for english it just show as it is.. but for chinese
how do you convert it to a readable format? currently im just seeing chinese
characters passed to me like this
u(NŽQ\\0(\\0C\\0H\\0I\\0N\\
Hi there, i was wondering how I could allow access to a script from
another server/host only ? Its prob a silly question but i guess get
their host ip ? The thing with that is one server which is a webpage
has a javascript popup to load the script on the other server, and i
believe that in this
Yes, check out the great documentation at http://www.php.net/docs.php
It's available in several languages. Great place to learn the wounderful world
of php.
- Original Message -
From: ""Gustav Wiberg"" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "PHP General"
Sent: Thursday, Septe
> Hello everyone,
>
> I'm using a while loop to display a list of people contained in my
> database.
> I'd like to assign different font colors to each depending on which city
> they're from, but I can't seem to get an if/elseif/else statement to work
> inside the while loop. Is there another way
Chris Shiflett wrote:
> Jasper Bryant-Greene wrote:
>
>> That is not true. The output to the client will look like this:
>>
>> HTTP/1.1 302 Found
>> Set-Cookie: name=value;domain=whatever
>> Location: http://my.domain.com/my.php
>> [...]
>
>
> Very nice explanation. :-)
>
> It is a common misco
Jasper Bryant-Greene wrote:
That is not true. The output to the client will look like this:
HTTP/1.1 302 Found
Set-Cookie: name=value;domain=whatever
Location: http://my.domain.com/my.php
[...]
Very nice explanation. :-)
It is a common misconception that header('Location: ...') redirects the
Philip Hallstrom wrote:
> Is there a way, using PHP, to determine if session cookies
> are enabled (or disabled) in the user's browser privacy
> settings?
Set a cookie using setcookie().
Then use an HTML meta refresh (or javascript, just not
Header("Location...) to redirect them to another page
Please keep in mind you are speaking about microseconds of performance
improvements. Optimising on this level is complete and utter nonsense.
Using output buffering may give your application a much higher
performance boost. And then you can still use a cache (opcode cache,
page cache, ...) which gr
On a totally unrelated note: My god, is that ugly code!
If I see this right there's only a single piece of real PHP in it:
putting the variable in the action field. For the rest: Leave PHP an use
pure HTML. Or use a decent form toolkit. like PEAR's HTML_Quickform.
There's no point in tons of print
http://www.thewebmasters.net/php/class.Htpasswd.phps
Google "htpasswd php", first hit.
Don't people use search engines any more?
AllOLLi
Mal: "How drunk was I last night?"
Jayne: "I don't know. I passed out."
[firefly 06]
--
PHP General Mailing List (http://www.php.net/)
To unsubsc
http://www.thewebmasters.net/php/class.Htpasswd.phps
Google "htpasswd php", first hit.
Don't people use search engines any more?
AllOLLi
Mal: "How drunk was I last night?"
Jayne: "I don't know. I passed out."
[firefly 06]
--
PHP General Mailing List (http://www.php.net/)
To unsubsc
Hi again!
Is this impossible to do in PHP?
Dim objNet
On Error Resume Next
'In case we fail to create object then display our custom error
Set objNet = CreateObject("WScript.NetWork")
If Err.Number <> 0 Then'If error occured then display
notice
MsgBox "Don't be Shy." & vbC
Hi there!
Try using ob_start() and then set sessions, and then user HEADER...
http://se.php.net/manual/sv/function.ob-start.php
/G
@varupiraten.se
- Original Message -
From: "Philip Hallstrom" <[EMAIL PROTECTED]>
To: "Jasper Bryant-Greene" <[EMAIL PROTECTED]>
Cc: "php list"
Sent: Th
Mikey wrote:
Jasper Bryant-Greene wrote:
Philip Hallstrom wrote:
Then use an HTML meta refresh (or javascript, just not
Header("Location...) to redirect them to another page.
Why not header("Location...")? Just out of interest -- it's always
worked for me, and it's a much better way to r
Philip Hallstrom wrote:
Then use an HTML meta refresh (or javascript, just not Header("Location...)
to redirect them to another page.
Why not header("Location...")? Just out of interest -- it's always worked for
me, and it's a much better way to redirect users for many reasons[1] (like
not br
Jasper Bryant-Greene wrote:
Philip Hallstrom wrote:
Then use an HTML meta refresh (or javascript, just not
Header("Location...) to redirect them to another page.
Why not header("Location...")? Just out of interest -- it's always
worked for me, and it's a much better way to redirect users f
Philip Hallstrom wrote:
Then use an HTML meta refresh (or javascript, just not
Header("Location...) to redirect them to another page.
Why not header("Location...")? Just out of interest -- it's always
worked for me, and it's a much better way to redirect users for many
reasons[1] (like not br
Here is an another approach.. if you glance at a calendar, youll notice that
the only times there are 5 sats in a month, is when the 1st of 30 day month
falls on a fri or sat.. or in a 31 day month, a thur, fri, or say..
So, you could simply test the weekday the first of the month has, and the
Is there a way, using PHP, to determine if session cookies are enabled (or
disabled) in the user's browser privacy settings?
Set a cookie using setcookie().
Then use an HTML meta refresh (or javascript, just not
Header("Location...) to redirect them to another page.
On that page, see if the
Using an API for an Ecomemrce app. Wondering how I can ensure I have
access to port 443 and that it's open?
use fsockopen() to open a socket connection to the host on port 443. You
should at least connect... if it fails to connect, it's not open...
-philip
--
PHP General Mailing List (http
You can.. Dont include the expire argument.. or set it to 0.
Jason
Sorry for clogging your inbox, Jason, I didn't CC: the list the first time.
if you don't set the expire argument (it's optional), the cookie expires
at the end of the browser session. I think the best you can do is set
th
Oops...I didn't see the earlier message that BC functions were not enabled
on your server. So, I'd have to concur with Oliver Grätz's suggestions, and
add some of my own:
- can you change hosts?
- are you allowed to install software in your own directory? You
may be able to com
Hello everyone,
I'm using a while loop to display a list of people contained in my database.
I'd like to assign different font colors to each depending on which city
they're from, but I can't seem to get an if/elseif/else statement to work
inside the while loop. Is there another way to do this?
Hi,
Is there a way, using PHP, to determine if session cookies are enabled (or
disabled) in the user's browser privacy settings?
Thanks,
Don
Hey,
Using an API for an Ecomemrce app. Wondering how I can ensure I have
access to port 443 and that it's open?
Thanks!
A
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 03:52 PM 9/1/2005, << z a p a n >> wrote:
Hello everyone,
I'm using a while loop to display a list of people contained in my database.
I'd like to assign different font colors to each depending on which city
they're from, but I can't seem to get an if/elseif/else statement to work
inside the
> I'm using a while loop to display a list of people contained
> in my database.
> I'd like to assign different font colors to each depending on
> which city
> they're from, but I can't seem to get an if/elseif/else
> statement to work
> inside the while loop. Is there another way to do this?
Hi -
The 'precision' ini value refers, I believe, only to float numbers, not
BC_math numbers (which are stored as strings). I believe the bcmath.scale
parameter is the one you need. It can be set via ini_set or bcscale() -
http://php.he.net/manual/en/function.bcscale.php
Perhaps you
Your best hope is to do a reverse lookup on the IP address.
On 9/1/05, Oliver Grätz <[EMAIL PROTECTED]> wrote:
> Gustav Wiberg schrieb:
> > Hi there!
> >
> > Is it possible to get (retrieve) the computername of the client? I just want
> > the name for comparing...
>
> In PHP all you get from the
You are right, ignore my post.
Jason
On 9/1/05, John Nichel <[EMAIL PROTECTED]> wrote:
>
> Jason Davidson wrote:
> > You can.. Dont include the expire argument.. or set it to 0.
>
> No. Do this, and the cookie will expire when you close the browser window.
>
> --
> John C. Nichel
> ÜberGeek
>
Jason Davidson wrote:
You can.. Dont include the expire argument.. or set it to 0.
No. Do this, and the cookie will expire when you close the browser window.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
You can.. Dont include the expire argument.. or set it to 0.
You sure?
The manual says (last sentence):
expire
The time the cookie expires. This is a Unix timestamp so is in number of
seconds since the epoch. In other words, you'll most likely set this with
the time() function plus the numb
Jason Davidson wrote:
You can.. Dont include the expire argument.. or set it to 0.
Jason
On 9/1/05, Philip Hallstrom <[EMAIL PROTECTED]> wrote:
Simple question I guess..
How do I set a cookie so it will never expire? (I don't want it to
expire)
You can't really... I could delete
You can.. Dont include the expire argument.. or set it to 0.
Jason
On 9/1/05, Philip Hallstrom <[EMAIL PROTECTED]> wrote:
>
> > Simple question I guess..
> >
> > How do I set a cookie so it will never expire? (I don't want it to
> expire)
>
> You can't really... I could delete it and that woul
Hello,
Is there anyway to create a CSR resource from the string result generated
with openssl_csr_export?
--
/*---
Best regards,
Jared D. Hurn ([EMAIL PROTECTED])
Contract Developer
---*/
Simple question I guess..
How do I set a cookie so it will never expire? (I don't want it to expire)
You can't really... I could delete it and that would be the same as
expiring it...
Best you can do is set it to expire 100 years in the future or some
such... see the manual for SetCookie()
Hi
Simple question I guess..
How do I set a cookie so it will never expire? (I don't want it to expire)
/G
@varupiraten.se
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, I made a mistake. See below:
""Brian P. O'Donnell"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> ""Shaun"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi,
> >
> > Is it possible to get the number of saturdays and sundays for a given
> month
> > / year
""Shaun"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Is it possible to get the number of saturdays and sundays for a given
month
> / year?
>
> Thanks for your help.
Here's another way to do it. Each function will return either 4 or 5. If you
need both Saturdays and Sund
could this help
If you want to completely preserve the arrays and just want to append
them to each other, use the + operator:
"data");
$result = $array1 + $array2;
?>
http://www.php.net/manual/en/function.array-merge.php
Ahmed Abdel-Aliem wrote:
i have the array with the following st
Is it possible to get the number of saturdays and sundays for a given month
/ year?
This seems to work...
0 && $week_day < 6 ) {
$day += 6 - $week_day; // $day = first saturday
}
$ts = mktime(0, 0, 0, $month, $day, $year);
$tmp_month = date("n", $ts); // 1 - 12
while ( $month == $tmp_mo
since only the total number of saturdays/sundays is what he wants to
know, you can use some clever math. Basically, the amount of saturdays
in a year is:
floor(365 (+1 if it's a leap year) (-days from january first to first
saturday) / 7);
and sundays = saturdays (-1 if the modulo from the top
the answer is simply yes!
You can have a simple for looping to do so.
hope this help!
""Shaun"" <[EMAIL PROTECTED]>
wrote:[EMAIL PROTECTED]
> Hi,
>
> Is it possible to get the number of saturdays and sundays for a given
> month / year?
>
> Thanks for your help.
--
PHP General Mailing List
Dear Jordan,
I know what you mean. But you may try this one and you will know:
the result is the same as 16!!!
So that's why I ask this question! I am not stupid like that!
Please help, thx!
"Jordan Miller" <[EMAIL PROTECTED]>
wrote:[EMAIL PROTECTED]
> http://us3.php.net/manual/en/ini.core.p
http://us3.php.net/manual/en/ini.core.php#ini.precision
precision sets the number of significant digits, *NOT* the number of
digits displayed after the decimal point.
If you want to get pi out to 16 decimal places you need a precision
of *17* because the beginning 3 is a significant digit.
> Hi,
>
> Is it possible to get the number of saturdays and sundays for a given
> month
> / year?
>
> Thanks for your help.
Hi Shaun,
Not sure if there's a graceful PHP solution (there probably is, but can't
think of one, myself, right at this moment) but it sounds like what you
might need is a
Wow! Fantastic rundown Satyam! Thanks for posting such a complete analysis. I
had no idea that you could use commas instead of periods to join multiple
strings much less do it without concatinating, that's very interesting.
I don't think I've ever seen that used in any sample code before. I'm
Gustav Wiberg schrieb:
> Hi there!
>
> Is it possible to get (retrieve) the computername of the client? I just want
> the name for comparing...
In PHP all you get from the client is in the predefines variables:
http://de.php.net/manual/en/language.variables.predefined.php
Perhaps these are of a
Gustav Wiberg schrieb:
> Hi there!
>
> Is it possible to get (retrieve) the computername of the client? I just want
> the name for comparing...
In PHP all you get from the client is in the predefines variables:
http://de.php.net/manual/en/language.variables.predefined.php
Perhaps these are of a
Wong HoWang schrieb:
> but my server configure don't have bcmath enabled, is there any other way to
> do so?
Since the internal routines of PHP have limited precision, you these
options:
- Find a way to activate bcmath (not likely to happen on a shared
hosting account)
- Find an external progra
but my server configure don't have bcmath enabled, is there any other way to
do so?
"Torgny Bjers" <[EMAIL PROTECTED]> wrote:[EMAIL PROTECTED]
> Wong HoWang wrote:
>> Dear all,
>>
>> I'm trying to do like this but failed:
>>
>> > ini_set('precision',16);
>> echo pi();
>> ?>
>>
>> How can I get mo
Wong HoWang wrote:
> Dear all,
>
> I'm trying to do like this but failed:
>
> ini_set('precision',16);
> echo pi();
> ?>
>
> How can I get more digits after . ?
I am fairly sure that you have to use BCMath for this:
http://www.php.net/manual/en/ref.bc.php
Give it a go and see what happens! :)
R
Dear all,
I'm trying to do like this but failed:
How can I get more digits after . ?
Can anyone help? Thx!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Dear all,
I'm trying to do like this but failed:
How can I get more digits after . ?
Can anyone help? Thx!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 31 August 2005 16:56, [EMAIL PROTECTED] wrote:
> $varname = '$firstname $lastname told me to find the file in folder
> C:\newtext\'; echo $varname;
>
>
> Yields..
>
> $firstname $lastname told me to find the file in folder C:\newtext\
Actually, that'll give you an error as well, since \' is
Hi,
Is it possible to get the number of saturdays and sundays for a given month
/ year?
Thanks for your help.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If you want to completely preserve the arrays and just want to append them to
each other, use the + operator.
"data");
$result = $array1 + $array2;
?>
The numeric key will be preserved and thus the association remains.
Array
(
[1] => data
)
Its actually on the same page as array_merge i
On the php.net you can read the following about fread:
"fread() reads up to length bytes from the file pointer referenced by handle.
Reading stops when length bytes have been read, EOF (end of file) is reached,
or (for network streams) when a packet becomes available, whichever comes
first."
I
> Auugh!! Why would you want to do this? You're flying in the face of
> relational database theory and practice. Position of a record in the table
> is, or should be irrelevant.
Agreed - "position" is a notional concept. The data is stored physically in
some sort of order, but what order that is
i have the array with the following structure :
Array
(
[19] => 20.00
[25] => 20.00
[7] => 30.00
[17] => 30.00
)
when i merge a field to it using array_merge
it returns that :
Array
(
[0] => 20.00
[1] => 20.00
[2] => 30.00
[3] => 30.00
[4] => 200.00
)
how can
> In fact, this is a poor example since the difference gets larger with
longer
> string and more arguments. When you use dots, the interpreter has to
> actually concatenate the string, looking for memory to do so and freeing
it
> up afterwards. This takes time. With commas, each argument is sent
63 matches
Mail list logo