php-general Digest 11 Aug 2011 07:12:40 -0000 Issue 7439

2011-08-11 Thread php-general-digest-help
php-general Digest 11 Aug 2011 07:12:40 - Issue 7439 Topics (messages 314464 through 314486): Re: text insertion 314464 by: Ashley Sheridan 314465 by: Chris Stinemetz 314466 by: Shaun Farrell 314467 by: Daniel P. Brown 314469 by: Chris Stinemetz

[PHP] PHP mysqli help

2011-08-11 Thread Peet Grobler
So I have: $result = $dbh-query (select * from roles order by name); $row = mysqli_fetch_object ($result); function process_field ($which) { // This fails, I need to know how to do this the right way if ($row-may_$which == 'Y') { // Print stuff } else {

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Tim Streater
On 11 Aug 2011 at 02:22, Jason Pruim pru...@gmail.com wrote: while ($num != 1) { while($row = mysql_fetch_assoc($result)) { $padnum = number_pad($num, 4); echo $row['areacode'] . - . $row['prefix'] . - . $padnum . BR; $num++; } } This is certain to fail.

RE: [PHP] Problem with inserting numbers...

2011-08-11 Thread Dajka Tamás
While no tusing just one while loop? $num = 0; while ( ( $row = mysql_fetch_assoc($result) ) $num++ = 1000 ) { //do whatever you want and you'll get all results or max. 1000 lines ( whatever comes first ) } Cheers, Tom -Original Message- From: Tim Streater

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Jason Pruim
Replies below Jason Pruim li...@pruimphotography.com On Aug 10, 2011, at 11:08 PM, Ken Robinson wrote: At 09:22 PM 8/10/2011, Jason Pruim wrote: So here I am attempting to generate some numbers to be inserted into a database... eventually they will make up a phone number (Which I've

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Tamara Temple
On Aug 10, 2011, at 8:22 PM, Jason Pruim wrote: So here I am attempting to generate some numbers to be inserted into a database... eventually they will make up a phone number (Which I've emailed about before and know about the bad ideas with it.. But it's the customer :)) Here is the

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Florian Lemaitre
Le 11/08/2011 13:08, Tamara Temple a écrit : On Aug 10, 2011, at 8:22 PM, Jason Pruim wrote: while ($num != 1) { Problem is here ^ You are testing a numeric $num with a string 1, which $num will *never* equal. Leave off the quotes on the number. Hum, I suggest you read this

Re: [PHP] concatenating

2011-08-11 Thread Andre Polykanine
Hello Chris, CS Is it possible to concatenate a string and an element from a CS mysql_fetch_assoc array? I haven't had much luck searching google. CS Such as concatenating results with ' . $posts_row['store_tptest'] . CS ' so that if there are no elements returned nothing will be

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Ashley Sheridan
Jason Pruim li...@pruimphotography.com wrote: Replies below Jason Pruim li...@pruimphotography.com On Aug 10, 2011, at 11:08 PM, Ken Robinson wrote: At 09:22 PM 8/10/2011, Jason Pruim wrote: So here I am attempting to generate some numbers to be inserted into a database... eventually

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Andrew Ballard
On Wed, Aug 10, 2011 at 9:22 PM, Jason Pruim pru...@gmail.com wrote: So here I am attempting to generate some numbers to be inserted into a database... eventually they will make up a phone number (Which I've emailed about before and know about the bad ideas with it.. But it's the customer :))

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Jim Lucas
On 8/10/2011 6:22 PM, Jason Pruim wrote: So here I am attempting to generate some numbers to be inserted into a database... eventually they will make up a phone number (Which I've emailed about before and know about the bad ideas with it.. But it's the customer :)) Here is the code I am

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Jason Pruim
Jason Pruim pru...@gmail.com On Aug 11, 2011, at 9:35 AM, Andrew Ballard wrote: On Wed, Aug 10, 2011 at 9:22 PM, Jason Pruim pru...@gmail.com wrote: So here I am attempting to generate some numbers to be inserted into a database... eventually they will make up a phone number (Which I've

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Jason Pruim
Jason Pruim pru...@gmail.com On Aug 11, 2011, at 11:52 AM, Jim Lucas wrote: On 8/10/2011 6:22 PM, Jason Pruim wrote: So here I am attempting to generate some numbers to be inserted into a database... eventually they will make up a phone number (Which I've emailed about before and know

[PHP] PHP 5.3.7RC5 Released for Testing

2011-08-11 Thread Ilia Alshanetsky
The fifth and final release candidate of 5.3.7 was just released for testing and can be downloaded here: https://downloads.php.net/ilia/php-5.3.7RC5.tar.bz2 (md5sum: 2604b92812e213287fa0fbc5d61223db) https://downloads.php.net/ilia/php-5.3.7RC5.tar.gz (md5sum: 2d3315be5ef7ab90ca359978f36c2001)

[PHP] Phar: Mapping HTTP URLs to a www/ subdirectory

2011-08-11 Thread Christian Weiske
Hello, I'm failing to create a .phar file for SemanticScuttle[1], a self-hosted social bookmarking application. The directory layout of SC is as follows: - data/ - doc/ - scripts/ - src/ - SemanticScuttle/ - Service.php - www/ - index.php - edit.php The separation of src/, data/ and

[PHP] form handling

2011-08-11 Thread Chris Stinemetz
I have two forms on the same php script. Is it possible to submit both forms to the same action=processform.php with a single submit button? If so would you give me examples on how to handle this? I will also continue searching google. Thank you, Chris -- PHP General Mailing List

Re: [PHP] form handling

2011-08-11 Thread Stuart Dallas
On 11 Aug 2011, at 19:25, Chris Stinemetz wrote: I have two forms on the same php script. Is it possible to submit both forms to the same action=processform.php with a single submit button? If so would you give me examples on how to handle this? Three options spring to mind... 1) Combine

Re: [PHP] form handling

2011-08-11 Thread Ken Robinson
At 02:25 PM 8/11/2011, Chris Stinemetz wrote: I have two forms on the same php script. Is it possible to submit both forms to the same action=processform.php with a single submit button? If you want to submit at the same time, why do you have two forms? Ken -- PHP General Mailing List

[PHP] Fwd: i, em, strong and b in html5h

2011-08-11 Thread Grega Leskovšek
There was a topic on that a while ago and I am now reading Introducing HTML 5 from Bruce Lawson and Remy Sharp (pages 58-59) in mental hospital. It is not so bad as it seems, but I do not read email every day. They do not have wireless :( All four are valid in html5: em and strong marks up for

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Jim Lucas
On 8/11/2011 9:34 AM, Jason Pruim wrote: Hey Jim, Would that still hold true with inserting into a database which is the true end of it? This is going to be a one time thing I'm doing and I'm trying to make it a learning experience as I go since that's what everything should be right?

Re: [PHP] form handling

2011-08-11 Thread Chris Stinemetz
If the two forms call the same script that's fine.  If not, that will work too.  Just realize that the inputs from one form will NOT be returned to the script when the submit is used from the other form. Jim, This is what I am trying to do. One submit button for both forms going to the same

Re: [PHP] form handling

2011-08-11 Thread Jim Giner
I'm thinking that Chris means that he has a 'page' designed that utilizes two form tags for functionally different sets of input fields. The answer Chris is that a page can have many forms and whether or not they trigger the same script upon submit or not doesn't matter. Go ahead! My sample

Re: [PHP] form handling

2011-08-11 Thread Jim Giner
Jim, This is what I am trying to do. One submit button for both forms going to the same destination. The only reason I am doing this is because I can't figure out why my ajax for my select menus is altering my tinyMCE textarea box. Ultimately if I can figure out how to control the ajax within

Re: [PHP] form handling

2011-08-11 Thread Chris Stinemetz
Chris, By definition, a 'submit' button submits a form.  Not 2 forms.  Each form has to have it's own form. It is not feasible to submit two forms - since the conversation from your client pc is going to be garbled even if you could (JS?) do the second submit.  One transactiion is going to

Re: [PHP] form handling

2011-08-11 Thread Bastien
On 2011-08-11, at 9:13 PM, Jim Giner jim.gi...@albanyhandball.com wrote: Jim, This is what I am trying to do. One submit button for both forms going to the same destination. The only reason I am doing this is because I can't figure out why my ajax for my select menus is altering my

Re: [PHP] form handling

2011-08-11 Thread Chris Stinemetz
I would bet it's the quotes screwing up the js. Can / are you escaping that variable when ajaxing it back? Bastien Koert 905-904-0334 I found a way to make the ajax work with one form. I removed the table and the ajax worked just fine. Aparently you can't embed div containers within a