php-general Digest 10 Dec 2001 15:10:38 -0000 Issue 1044

Topics (messages 77176 through 77197):

Re: Doing statistics with MySql data?
        77176 by: Martin Towell
        77179 by: Fred

Announcement: Frederick Webmail v1.0.0 released
        77177 by: Richard Heyes

KISGB (Keep It Simple Guest Book) v2.6 released
        77178 by: Gaylen Fraley

Re: how do i get the browser's screen resolution?
        77180 by: R'twick Niceorgaw

JavaScript and PHP
        77181 by: Jordan
        77182 by: Richard Crawford

PHP+MYSQL: unable to select database
        77183 by: josep
        77185 by: Jon Farmer

PHP Safe Mode control
        77184 by: Charles Williams

variables
        77186 by: Lennart Johansen
        77188 by: Andrew Brampton

PHP+MYSQL: unable to select database even FLUSH PRIVILEGES
        77187 by: josep

PHP+MYSQL unable to select database
        77189 by: josep
        77191 by: Miles Thompson
        77193 by: Benjamin Pflugmann

Re: Store locator / postcode proximity
        77190 by: Rich Buggy

PHP and plugin detection
        77192 by: Daniel Reichenbach

WEB PAGE CALCI
        77194 by: Chamarty Prasanna Kumar

Re: PHP Forms and String Limitations
        77195 by: Jørg Vidar Bryne

RegEx gurus help...
        77196 by: Brian V Bonini

Frames creating problems...
        77197 by: dhaval desai

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
try looking at http://informit.com/
has heaps of good books online there - you might be able to find a good book
on sql.

-----Original Message-----
From: Daniel Alsén [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 1:27 PM
To: PHP
Subject: [PHP] Doing statistics with MySql data?


Hi,

i have a MySql table with five columns that are filled with different
numerical values. I need some pointers to where i can learn how to build
statistics out of this data (ie the average value of a column, how many
instances there is of a certain value etc).

Regards
# Daniel Alsén    | www.mindbash.com #
# [EMAIL PROTECTED]  | +46 704 86 14 92 #
# ICQ: 63006462   | +46 8 694 82 22  #
# PGP: http://www.mindbash.com/pgp/  #


-- 
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]
--- End Message ---
--- Begin Message ---
There are built in functions in mysql for just this sort of thing.  There
are AVG() and COUNT() functions as well as many more.  Read up on them here:

http://www.mysql.com/doc/F/u/Functions.html

Fred

Daniel alsén <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> i have a MySql table with five columns that are filled with different
> numerical values. I need some pointers to where i can learn how to build
> statistics out of this data (ie the average value of a column, how many
> instances there is of a certain value etc).
>
> Regards
> # Daniel Alsén    | www.mindbash.com #
> # [EMAIL PROTECTED]  | +46 704 86 14 92 #
> # ICQ: 63006462   | +46 8 694 82 22  #
> # PGP: http://www.mindbash.com/pgp/  #
>


--- End Message ---
--- Begin Message ---

My webmail app, Frederick, is now released. Small (though soon to grow in
features) and fast,
it is available from here:

http://www.phpguru.org/frederick/

 - Extremely cusomisable (entirely template based)
 - One installation can be used with various
   urls, each having it's own template sets (skins)
 - Plugin infrastructure in place so extending is a
   simple affair
 - Supports pop3/imap
 - Excellent mime support
 - Intuitive UI
 - BSD License

--
Richard Heyes
"If you have any trouble sounding condescending,
find a Unix user to show you how it's done." - Scott Adams

--- End Message ---
--- Begin Message ---
Version 2.6 of my Guest book is released!

Description:

A PHP (version 4.x) guestbook program that does not require an rdbms. Can be
Public or Private through HTTP Authentication. Automated install script,
fully customizable, clean, and fast. Separate multiple logging capabilty for
tracking anything! Includes web-based password protected Admin
functionality, along with email notification, greeting, ip logging, ip
banning, bad word filter, smileys, allowable html tags in comments,
next/previous, etc. Themes for controlling appearance that allow for
background colors, images, animations, etc. Language support for Dutch,
English, French, German, Polish, Portuguese, Spanish, and Surinam.

--
Gaylen
[EMAIL PROTECTED]
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite



--- End Message ---
--- Begin Message ---
Can you hide it in a hidden form element ? or pass it as a variable in the
URL like http://myurl?screen_size=<screen size> ?

-----Original Message-----
From: Roel Derckx [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 09, 2001 5:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] how do i get the browser's screen resolution?


Hi

I'm working on a large portal-like php/html site with some large graphics.
The original design is for 1024x768 and up, but i also want it to be well
viewable under 800x600 so parts of the design have to be resized for that.

BUT, i can't seem to get that kind of information from within PHP. I found a
way around (check it with Javascript and store it as a cookie), but that's
not working fine for me.

Can someone tell me:
- how do i get the browser's screen resolution returned in a variable?
OR
- how can i read Javascript variables under PHP?

Help please.

Regards,
Roel



--
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]




--- End Message ---
--- Begin Message ---
Hey all,

Just a quick question...how would you pass a PHP variable to a JavaScript
function?

-Jordan


--- End Message ---
--- Begin Message ---
Assuming your page is called something like myPageWithScripts.php, do 
something like this:

< html >
< head >
< script language="javascript" type="text/javascript" >
< !-- //Hide
function myFunction {
   alert("My PHP variable value is <? echo($variable); ?>");
}
// -->
< /head >

...and so on.



Jordan wrote:

> Hey all,
> 
> Just a quick question...how would you pass a PHP variable to a JavaScript
> function?
> 
> -Jordan
> 
> 
> 
> 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
        http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

"When you have lost the ability to laugh at yourself, you have lost the 
ability to think straight." --Clarence Darrow

"Push the button, Max!"


--- End Message ---
--- Begin Message ---
 I get:
 
 unable to select database
 
 when I visit my guestbook.php
 
 The user trying it is set in the mysql.user (without any perms) and in the
 mysql.db (with all perms).

Do I have to set all perms to this user in the mysql.user table?
 
Josep

--- End Message ---
--- Begin Message ---
> I get:
>
>  unable to select database
>
>  when I visit my guestbook.php
>
>  The user trying it is set in the mysql.user (without any perms) and in
the
>  mysql.db (with all perms).
>
> Do I have to set all perms to this user in the mysql.user table?

Did you 'flush privileges' ?

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key


--- End Message ---
--- Begin Message ---
Hey all,

I just finished an article on Safe Mode control for PHP but it is based on
non-Win32 systems.  Can somebody with a bit more experience in Win32 servers
take a look at it and let me know what can be done to achieve, if not the
same level of control then close to it, on a Win32 platform?

The article is at:
http://www.acnsnet.com/~slydder/stories/op/storiesView/sid/53/

thanks,
chuck

Chuck's Top 10 Things to Remember and Think about!
=======================================================
10. Please return stewardess to original upright position.
9. Fighting for peace is like fucking for virginity.
8. Never date someone because you're too lazy to commit suicide.
7. It is not the fall that kills you.  it's the sudden stop at the end.
6. You can't have everything.  Where would you put it all?
5. " Real Windows Performance", on the next "In Search Of".
4. 2 rules to success in life. 1. Don't tell people everything you know.
3. 24 hours in a day, 24 beers in a case.  Coincidence?
2. 9 out of 10 men who try Camels prefer women.
1. Always borrow money from a pesimist.  They never expect it back anyway.

That's it!  NO MORE! JEEZ! GET BACK TO WORK!


--- End Message ---
--- Begin Message ---
Is it advisable to use the same names for variables both in a function and in 
its activator([?] I'm sorry I don't know the correct word) as follows?

<?
function test($var1, $var2) {
        ...whatever;
        return $result;
}

var $var1, $var2;
$result = test($var1, $var2); // this is what I called the "activator" ... :)
?>

Lennart Johansen

--- End Message ---
--- Begin Message ---
I don't see any reason not to.
But you should allways try and make your varible names meaningful...

In some cases I do end up having the same, for example if I'm passing X,Y
coords around. But in othercases they have totally different names.

Also out of interest, activator=formal parameter, the other one is Actual
parameter (/me prays I got that the right way around :))

Andrew

----- Original Message -----
From: "Lennart Johansen" <[EMAIL PROTECTED]>
To: "PHP MailingList" <[EMAIL PROTECTED]>
Sent: Monday, December 10, 2001 9:13 AM
Subject: [PHP] variables


> Is it advisable to use the same names for variables both in a function and
in
> its activator([?] I'm sorry I don't know the correct word) as follows?
>
> <?
> function test($var1, $var2) {
> ...whatever;
> return $result;
> }
>
> var $var1, $var2;
> $result = test($var1, $var2); // this is what I called the "activator" ...
:)
> ?>
>
> Lennart Johansen
>
>
> --
> 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]
>
>

--- End Message ---
--- Begin Message ---
I've did:

FLUSH PRIVILEGES

but nothing changes.

Josep.


--- End Message ---
--- Begin Message ---
I can't select a database from a php script.

I've set privileges in both the user and the data base tables
and I've done FLUSH PRIVILEGES;

WHY?

JOSEP.

--- End Message ---
--- Begin Message ---
Have you checked the docs? Have you double-checked the username, password 
and permissions?
Have you added " or die(mysql_error())" to your database connection function?
If this site is remote, does your username/password have rights to access 
the database?

Good luck - Miles Thompson

At 11:58 AM 12/10/2001 +0100, josep wrote:
>I can't select a database from a php script.
>
>I've set privileges in both the user and the data base tables
>and I've done FLUSH PRIVILEGES;
>
>WHY?
>
>JOSEP.
>
>
>--
>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]

--- End Message ---
--- Begin Message ---
Hi.

First, please avoid cross-posting.

Try to narrow down the problem by trying from the command line client
(i.e. try to rule out PHP as source of the problem). If that doesn't
work, try the PHP list.

If you are successful, it belongs to the MySQL list (as PHP is no
longer part of the problem).

And it doesn't sound like any particular debian problem at all.

On Mon, Dec 10, 2001 at 11:58:51AM +0100, [EMAIL PROTECTED] wrote:
> I can't select a database from a php script.

What means "i can't select"? Does it simply show no effect? Do you get
an error? Anything else?

> I've set privileges in both the user and the data base tables
> and I've done FLUSH PRIVILEGES;
> 
> WHY?

I cannot say, because you did not provide enough information, mainly
which error message you get (provided you got one).

You may want to have a look at the following section from the fine
manual: http://www.mysql.com/doc/A/c/Access_denied.html

If that doesn't help, don't forget to mention, what you already have
tried. And please write only to one list at a time, the one which
seems most appropriate. Thanks.

Bye,

        Benjamin.


PS: Reply-To set accordingly.

-- 
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
> I'm wondering if anyone has any information about how to get the
> proximity data for postcodes in Australia? Or is it safe to assume
> that if a postcode is, say, 3107, that 3120 or 3110 (for example)
> are nearby as well as 3108 (so, perhaps, 10 above and 10 below could
> be safely assumed to be "nearby"?)

  Don't even bother trying that for Sydney. There's a border around Western
Sydney where the Eastern suburbs are 21xx and the Western ones are 27xx. For
example 2148 and 2767 are next to each other.

    Rich



--- End Message ---
--- Begin Message ---
Hy,

is there any way to detect the plugins a user has installed in his
browser with PHP? I want to write a page where users get a plugin
depending on their installation. If none of the required plugins
is available an error page should be viewed.

If it's not possible using PHP, can it be done with JavaScript?

Greetings,
Daniel


--- End Message ---
--- Begin Message ---


Hi All,
   
     Using PHP,is there any function for

calculating the size of a Web page, means the size of

everything the browser has to load to render the page.

That includes the HTML file, all the graphics, 

animations, CSS, php. And the input being URL of the

page.


Thanks in advance,


Kumar.
 

--- End Message ---
--- Begin Message ---
"Jeremy Reed" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> This is the problem: The user tries to submit a news article of 2+ pages
> (approx 4400 characters) but the article gets truncated to about 4050
> characters.  Is there some sort of limitation on PHP variables that is
> causing this?

Are you using <form method=get>or <form method=post> ?

I'm not certain about the details but GET is not useful for handeling large
data, while POST has a default setting of max 2MB pr. request.

-Jørg




--- End Message ---
--- Begin Message ---
I need to replace all relative links in an html
doc with absolute links on the fly weather it
be an image link,
<img src='/_imgs/imgs_nav/transPix.gif' width='10' height='13'>
<img src='../_imgs/imgs_nav/transPix.gif' width='10' height='13'>

a URL,
<a href="/dealers/index.asp">

a link to an external JS file
<script language='JavaScript' src='/_js/scripts.js'
type='text/javascript'></script>

or external css file.
<link rel="stylesheet" href="../_css/style.css" type="text/css">

Anyone done this before and have a prefab regex laying
around they want to share?

-Brian

--- End Message ---
--- Begin Message ---
Hello Guys,

Well I have a website with frames. The problem here is
that I have a serach box in the top frame and I want
the results to be displayed in the other frame.

I have seen this on lot of websites but now I am
wondering how to do it when I am facing this problem..

Any help would be greately appreciated.

Thanx to all

Best Regards,
Dhaval Desai



__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
--- End Message ---

Reply via email to