[PHP] Weird while issue

2010-04-27 Thread Juan Rodriguez Monti
Hi guys, I have some issues with while. I have an HTML Form, that uses GET to process its contents. Then there's a PHP Script that receives the data, and evaluates the fields. So, in some instance of the code, I do something like : if (empty($a) AND empty($b)) { echo something; echo something;

Re: [PHP] Weird while issue

2010-04-27 Thread Juan Rodriguez Monti
2010/4/27 Peter Lind peter.e.l...@gmail.com: On 27 April 2010 14:36, Juan Rodriguez Monti j...@rodriguezmonti.com.ar wrote: Hi guys, I have some issues with while. I have an HTML Form, that uses GET to process its contents. Then there's a PHP Script that receives the data, and evaluates

[PHP] Two color rows in table inside while iteration

2010-04-28 Thread Juan Rodriguez Monti
Hello Guys, I would like to implement a two color row table for some queries that I'm doing. I use PHP to query a DB, then I use while to print all its results. I have a code pretty similar to this one : $results = Here the QUERY; echo html; echo head; echo 'link

Re: [PHP] Two color rows in table inside while iteration

2010-04-28 Thread Juan Rodriguez Monti
2010/4/28 Jay Blanchard jblanch...@pocket.com: [snip] I just want to show you how I write the table. What I would like to know is what do you suggest to do a two color row format. [/snip] Before your table; $trColor = 0; Then during the loop; while(foo){ $tr = (0 == $trColor % 2)?

Re: [PHP] Two color rows in table inside while iteration

2010-04-28 Thread Juan Rodriguez Monti
2010/4/28 Jay Blanchard jblanch...@pocket.com: [snip] Before your table; $trColor = 0; Then during the loop; while(foo){ $tr = (0 == $trColor % 2)? #E8E8E8 : #FF; echo tr style=\background-color:.$tr.\; ... Replace the hex values with the colors you desire. Just one more

Re: [PHP] Two color rows in table inside while iteration

2010-04-28 Thread Juan Rodriguez Monti
2010/4/28 Fernando ferna...@ggtours.ca: What about this: $color = even; while ($row = while condition )) {       $color = ($color == even) ? odd : even;       echo (tr class=\$color\);       echo td$row[0]/tdtd$row[1]/td  td$row[2]/tdtd$row[3]/tdtd$row[4]/td  ;       echo (/tr) } And

Re: [PHP] Two color rows in table inside while iteration

2010-04-29 Thread Juan Rodriguez Monti
2010/4/29 tedd tedd.sperl...@gmail.com: At 8:29 AM -0300 4/28/10, Juan Rodriguez Monti wrote: Hello Guys, I would like to implement a two color row table for some queries that I'm doing. I use PHP to query a DB, then I use while to print all its results. I have a code pretty similar

[PHP] PHP Site with CSS and Internet Explorer

2010-05-15 Thread Juan Rodriguez Monti
I guys, I'm having some problems with the following. I have a PHP Site working perfectly with HTML and CSS. The CSS runs flawlessly in Firefox and Google Chrome. However, I'm having some problems with Internet Explorer. I'm not able to show it centered ( the .css is to show centered content ) in

Re: [PHP] PHP Site with CSS and Internet Explorer

2010-05-17 Thread Juan Rodriguez Monti
2010/5/15 Jim Lucas li...@cmsws.com: Juan Rodriguez Monti wrote: I guys, I'm having some problems with the following. I have a PHP Site working perfectly with HTML and CSS. The CSS runs flawlessly in Firefox and Google Chrome. However, I'm having some problems with Internet Explorer. I'm

[PHP] User's IP Validation

2010-06-16 Thread Juan Rodriguez Monti
Hi people, I would like to know the best way to perform some kind of validation for an application that I've written. I have a system that ask through an HTML Form some questions to users. I use some cookies to save some information from the user side. However, I would like to implement some

Re: [PHP] User's IP Validation

2010-06-17 Thread Juan Rodriguez Monti
from my HTC -Original Message- From: Juan Rodriguez Monti j...@rodriguezmonti.com.ar Sent: 16. cervna 2010 20:26 To: php-general@lists.php.net Subject: [PHP] User's IP Validation Hi people, I would like to know the best way to perform some kind of validation for an application

[PHP] Limit failed logins attempts

2010-08-09 Thread Juan Rodriguez Monti
Hi guys, I would like to know what do you suggest to implement a limit for failed login attempts. I thought that might be a good idea, to define a session variable called ( failedattempts ), then check and if $failedattempts is greater than, suppose, 4 write to a Database ( ip, username and