Re: [PHP-DB] Random Password problem

2005-03-08 Thread Jochem Maas
J. Connolly wrote: I am using this php in order to create, store and send random passwords to people who want to join my mailing list. your seeding the randomizer with the value zero each time! the expression: (integer) md5(microtime()) is (almost) always going to equal zero (unless it happens to

Re: [PHP-DB] Shopping Cart

2005-03-08 Thread mohamed naazir
SIR SORRY FOR LATE . I AM NAAZIR FROM SRI LANKA..I AM DOING WEBDEVALOBMENT USING PHP AND MY SQL, I WAS BORN IN A MIDDLE CLASS FAMILLY. MY FATHER IS A BUSSINES MAN MOTHER IS HOUSE WIFE. I HAVE 5 SIISTER. MY FATHER BUSSINUS BADLY AFFECTED MY TSUNNMI . WE LOST OUR FATHER BUSSINES . AND FATHER SAY RO

RE: [PHP-DB] Random Password problem

2005-03-08 Thread Bastien Koert
and my version function change_password($id, $password) { //generate a random password $pass = ""; $salt = "abchefghjkmnpqrstuvwxyz0123456789"; srand((double)microtime()*100); $i = 0; while ($i <= 7) { $num = rand() % 33; $tmp = substr($salt, $num, 1); $pass = $pass

RE: [PHP-DB] Random Password problem

2005-03-08 Thread Wendell Frohwein
This is one I like to use jozef. function generate_password($length = 10) { $allowable_characters = "abcdefghjkmnopqrstuvwxyz23456789"; $ps_len = strlen($allowable_characters); mt_srand((double)microtime()*100); $pass = ""; for($i = 0; $i < $length; $i++) { $pass .= $allowable_cha

Re: [PHP-DB] Random Password problem

2005-03-08 Thread Stephen Johnson
I know that true randomness only exists in nature. However, the randomization in PHP is fairly good. I have only used it on fairly small scales (i.e. Randomizing 200 quotes to give a random quote when people log onto a page.) For passwords I have always gone an easier route. $password = time();

[PHP-DB] Random Password problem

2005-03-08 Thread J. Connolly
I am using this php in order to create, store and send random passwords to people who want to join my mailing list. I seem to be getting the same number very often which makes me fear that this is not so random. I am a noob so I do not know if this is coincidence or a fault in my coding. Righ

Re: [PHP-DB] PHP and JOIN... (I know.. it's easy!)

2005-03-08 Thread Tristan . Pretty
All good... I've beenm chattingto the people who will be using the system, and think I'm gonna do a phase 1, then 2 etc.. with phase 1, being just a simple search option, and add mor elater... Keeps the masses happy, and gives me more time... still need to sort out my prob though :-( CHeers for

Re: [PHP-DB] PHP and JOIN... (I know.. it's easy!)

2005-03-08 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Cool. cheers for the quick responce... Well, my flatmate is one of two, I live with a lesbian couple in London... One is a falsh guru, sho recently got into PHP (she's a REAL brain box, and picsk stuff up sooo much quick than us mere mortals!) Hard life init ;-) shucks. :-

[PHP-DB] Re:data grabbing and mathematics!

2005-03-08 Thread JeRRy
Okay I have this: $sql = "UPDATE round" . ($round_number -1) . " SET score=score+1 WHERE $select='$winner'"; Which works as it should. Now after all that is completed how is the best way to retrieve the nickname and the score in that round and update another table? Okay two tables, one is ro

Re: [PHP-DB] mysql_num_rows

2005-03-08 Thread Martin Norland
Calvin Lough wrote: That means that you dont have any rows to work with. It could mean that you are not connected to the database, or the query you performed did not return any rows. Calvin On Tue, 8 Mar 2005 16:11:10 +0300, Tsegaye Woldegebriel <[EMAIL PROTECTED]> wrote: Dear Sir or Madame, I foun

Re: [PHP-DB] PHP and JOIN... (I know.. it's easy!)

2005-03-08 Thread Kae Verens
Tristan Pretty wrote: > I'll then make a page that looks like this: > > file name: User(s) > 12.doc [EMAIL PROTECTED] (12 times) > [EMAIL PROTECTED] (1 times) > [EMAIL PROTECTED] (2 times) > etc.. > > I'll make the email addresses/

[PHP-DB] Re: reg expressions- please help!!!!!1

2005-03-08 Thread Kae Verens
Jonathan Trepczyk wrote: > i am trying to use regular expressions in php to query a Mysql > database( obviously flights tables). > > the idea is to provide a a search tool for the users to type in flight > searchs, eg. when is the next flight from London heathrow to > Manchester or how much is a f

Re: [PHP-DB] reg expressions- please help!!!!!1

2005-03-08 Thread Henk Jan Wils
you should first design a proper database before you can make queries... if you have one, post it so that i can see it.. greetz henk jan - Original Message - From: "Jonathan Trepczyk" <[EMAIL PROTECTED]> To: Sent: Tuesday, March 08, 2005 2:42 PM Subject: [PHP-DB] reg expressions- please h

[PHP-DB] reg expressions- please help!!!!!1

2005-03-08 Thread Jonathan Trepczyk
Hello Guys I need some help, i am trying to use regular expressions in php to query a Mysql database( obviously flights tables). the idea is to provide a a search tool for the users to type in flight searchs, eg. when is the next flight from London heathrow to Manchester or how much is a flight

Re: [PHP-DB] mysql_num_rows

2005-03-08 Thread J. Connolly
Use the mysql_error() function which may give you more answers. In addition you can use something like $num = mysql_num_rows($test); echo $num; If it returns 0 you have no entries, if nothing happens then you have problem with your query or connection. If you get a number then there is somethi

Re: [PHP-DB] mysql_num_rows

2005-03-08 Thread Calvin Lough
That means that you dont have any rows to work with. It could mean that you are not connected to the database, or the query you performed did not return any rows. Calvin On Tue, 8 Mar 2005 16:11:10 +0300, Tsegaye Woldegebriel <[EMAIL PROTECTED]> wrote: > Dear Sir or Madame, > I found the followi

[PHP-DB] mysql_num_rows

2005-03-08 Thread Tsegaye Woldegebriel
Dear Sir or Madame, I found the following error, Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxx/public_html/sitename/dynamicfile.php on line 61 What is the reason? I want anyone who knows to answer to reply me. Thank you in advance for sharing your pr

Re: [PHP-DB] Re:data grabbing and mathematics!

2005-03-08 Thread Neil Smith [MVP, Digital media]
At 09:48 08/03/2005 +, you wrote: Message-ID: <[EMAIL PROTECTED]> Date: Mon, 07 Mar 2005 13:01:45 -0600 From: Martin Norland <[EMAIL PROTECTED]> Reply-To: php-db@lists.php.net MIME-Version: 1.0 To: php-db@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer

Re: [PHP-DB] PHP and JOIN... (I know.. it's easy!)

2005-03-08 Thread Tristan . Pretty
Cool. cheers for the quick responce... Well, my flatmate is one of two, I live with a lesbian couple in London... One is a falsh guru, sho recently got into PHP (she's a REAL brain box, and picsk stuff up sooo much quick than us mere mortals!) Hard life init ;-) Anyhoo, my prob, in more detail, w

Re: [PHP-DB] PHP and JOIN... (I know.. it's easy!)

2005-03-08 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi all, long time no post... I've rebuilt a download tracking system my company uses. I built the original, and thought that a restructure would be a doddle! Ooops! ;-) Anyhoo... I used to capture each download in it's own row, replicating user data each time. (Eg: if a us

[PHP-DB] PHP and JOIN... (I know.. it's easy!)

2005-03-08 Thread Tristan . Pretty
Hi all, long time no post... I've rebuilt a download tracking system my company uses. I built the original, and thought that a restructure would be a doddle! Ooops! ;-) Anyhoo... I used to capture each download in it's own row, replicating user data each time. (Eg: if a user downloaded 5 files, I