Re: [PHP] Form validation issue

2009-12-20 Thread Midhun Girish
"then the page gets reloaded and clears all the javascript error messages and does the PHP validation." That is because the form is getting submitted... make sure you js code prevents form submit if errors are found Midhun Girish On Mon, Dec 21, 2009 at 8:13 AM, Ernie Kemp wrote: > Goo

[PHP] Form validation issue

2009-12-20 Thread Ernie Kemp
Good Day, I need help in in validating a form. The for is valdated be a javascript frist then if all the fields are filled in its valaded be PHP. The Form starts with: The "formValidator()" goes to a javascript and do

Re: [PHP] Re: SQL Queries

2009-12-20 Thread Jonathan Tapicer
Hello, That kind of queries usually run faster using a LEFT JOIN, like this: select u.id from users u left join notes n on u.id = n.user_id where n.id is null; That query will give you the ids of the users without notes. Make sure to have an index on notes.user_id to let the LEFT JOIN use i

[PHP] Re: SQL Queries

2009-12-20 Thread דניאל דנון
Sorry for the double-post, forgot to add up the way I thought about using: Simple sql query: SELECT * FROM `users` as u WHERE (SELECT COUNT(id) FROM notes WHERE user_id = u.id LIMIT 0,1) = 0 Problem is I have about 450,000 "users" and about 90% don't have "notes", and it takes LOADS of times ev

[PHP] SQL Queries

2009-12-20 Thread דניאל דנון
Hey, Lets assume I got a table named "users". It contains id & name. I have another table called "notes" - which contains id, user_id, contents I want to delete all users from table "users" that don't have notes (SELECT ... FROM notes WHERE user_id=ID) returns empty result. What is the fastest

Re: [PHP] OOP Design Question

2009-12-20 Thread Larry Garfield
On Sunday 20 December 2009 1:08:46 pm you wrote: > >> Maybe this would be the perfect opportunity for the php autoload > >> functions...? > >> > >> Thanks for your help/thoughts/comments, > >> dK > >> ` > > > > Yep, this is a textbook case for a proper autoload setup. And no, > > cramming all of

Re: [PHP] efficiency of include()

2009-12-20 Thread Nathan Rixham
Daniel Kolbo wrote: > Larry Garfield wrote: >> On Sunday 20 December 2009 10:45:45 am Daniel Kolbo wrote: >>> Hello PHPers, >>> >>> This is a two part question: >>> >>> 1) Is it faster to include one file with lots of code, or many separate >>> smaller individual files? Assume the one massive file

Re: [PHP] Checking for internet connection.

2009-12-20 Thread Andy Shellam
> By attempting to connect you will implicitly query DNS (which itself > is a connection to server). No it's not - it's putting out a packet targeted at an IP address and hoping a server will answer - hence why multi-cast works for DNS because you're not directly connecting to a specified ser

Re: [PHP] efficiency of include()

2009-12-20 Thread Daniel Kolbo
Larry Garfield wrote: > On Sunday 20 December 2009 10:45:45 am Daniel Kolbo wrote: >> Hello PHPers, >> >> This is a two part question: >> >> 1) Is it faster to include one file with lots of code, or many separate >> smaller individual files? Assume the one massive file is merely the >> concatenati

Re: [PHP] File and Directory Ownership Question

2009-12-20 Thread Al
On 12/20/2009 1:06 PM, Ashley Sheridan wrote: On Sun, 2009-12-20 at 12:58 -0500, Al wrote: I've got a PHP script running on a shared host [Blue Host] that creates a directory and writes files in it. The directory and files are "owned" by the site name, not "nobody" as I've always seen on oth

Re: [PHP] File and Directory Ownership Question

2009-12-20 Thread Ashley Sheridan
On Sun, 2009-12-20 at 12:58 -0500, Al wrote: > I've got a PHP script running on a shared host [Blue Host] that creates a > directory and writes files in it. > > The directory and files are "owned" by the site name, not "nobody" as I've > always seen on other shared hosts. > > Anyone have a pos

Re: [PHP] efficiency of include()

2009-12-20 Thread Larry Garfield
On Sunday 20 December 2009 10:45:45 am Daniel Kolbo wrote: > Hello PHPers, > > This is a two part question: > > 1) Is it faster to include one file with lots of code, or many separate > smaller individual files? Assume the one massive file is merely the > concatenation of all the smaller individua

Re: [PHP] OOP Design Question

2009-12-20 Thread Larry Garfield
On Sunday 20 December 2009 10:35:56 am Daniel Kolbo wrote: > Hello PHPers, > > I have a collection of about 60 objects (class definitions). They are > all very similar. They all share a substantial % of the same core. But > they all have slight variations as well. The approach I took was to > m

[PHP] File and Directory Ownership Question

2009-12-20 Thread Al
I've got a PHP script running on a shared host [Blue Host] that creates a directory and writes files in it. The directory and files are "owned" by the site name, not "nobody" as I've always seen on other shared hosts. Anyone have a possible explanation for this? Thanks, Al. -- PHP G

Re: [PHP] OOP Design Question

2009-12-20 Thread Robert Cummings
Set up autoloading: http://php.net/manual/en/language.oop5.autoload.php Cheers, Rob. Daniel Kolbo wrote: Hello PHPers, I have a collection of about 60 objects (class definitions). They are all very similar. They all share a substantial % of the same core. But they all have slight vari

[PHP] efficiency of include()

2009-12-20 Thread Daniel Kolbo
Hello PHPers, This is a two part question: 1) Is it faster to include one file with lots of code, or many separate smaller individual files? Assume the one massive file is merely the concatenation of all the smaller individual files. (I am assuming the one massive file would be faster..., but i

[PHP] OOP Design Question

2009-12-20 Thread Daniel Kolbo
Hello PHPers, I have a collection of about 60 objects (class definitions). They are all very similar. They all share a substantial % of the same core. But they all have slight variations as well. The approach I took was to make an abstract core class, and each of the 60 objects extends that co

Re: [PHP] Best ajax library

2009-12-20 Thread Ali Asghar Toraby Parizy
On Sat, Dec 19, 2009 at 7:13 PM, tedd wrote: > I have chosen jquery at last. because: >> >> * jQuery has a huge number of plugins available for everything you could >> imagine wanting to do online >> * The information on the jQuery site is extremely well documented, with >> many >> examples >> *

Re: [PHP] PHP and SEO Workarounds

2009-12-20 Thread Ashley Sheridan
On Sun, 2009-12-20 at 20:05 -0500, Gautam Bhatia wrote: > hey guys, > Thanks a lot everyone for the links and suggestions , > I will take a look into mod_rewrite and search engine friendly URL's To > make the site more efficient , > > > Regards, > Gautam bhatia. > mail2gauta

Re: [PHP] PHP and SEO Workarounds

2009-12-20 Thread Gautam Bhatia
hey guys, Thanks a lot everyone for the links and suggestions , I will take a look into mod_rewrite and search engine friendly URL's To make the site more efficient , Regards, Gautam bhatia. mail2gautambha...@gmail.com On Sun, 2009-12-20 at 12:44 +, Ashley Sheridan wr

Re: [PHP] PHP and SEO Workarounds

2009-12-20 Thread TG
Look into using your web server's mod_rewrite functionality to alter the URL that the search engines see. For an example, look at Wordpress' permalinks or Joomla's SEF (search engine friendly) URLs. What this will do is make all your dynamic pages look more like static ones. If all your PHP p

Re: [PHP] PHP and SEO Workarounds

2009-12-20 Thread Ashley Sheridan
On Sun, 2009-12-20 at 12:15 -0500, Gautam Bhatia wrote: > hey folks, > This is in regards to SEO and PHP, From what i have > read , most (Not all) the PHP Contents is dynamic , which makes it so > powerfull , but it also means that chances of it being indexed in search > engines ar

Re: [PHP] Checking for internet connection.

2009-12-20 Thread LinuxManMikeC
On Sun, Dec 20, 2009 at 2:32 AM, Andy Shellam wrote: >> >> I think the only way to detect if it can connect to the Internet is to >> see if you can grab a file from somewhere on the Internet. I'd hazard a >> guess that when operating systems are able to tell you they can "connect >> to the Interne

Re: [PHP] Checking for internet connection.

2009-12-20 Thread Andy Shellam
> > I think the only way to detect if it can connect to the Internet is to > see if you can grab a file from somewhere on the Internet. I'd hazard a > guess that when operating systems are able to tell you they can "connect > to the Internet" they are actually saying they can ping a predetermined