Re: [PHP] populate form input option dropdown box from existing data

2009-06-17 Thread PJ
I snipped to make it short... continue at bottom... > Step back from the code and consider the steps you need to perform... > > 1) Get an array of the categories, ideally in the form $cats[] > = categoryname. > > 2) Get an array of the category IDs that should be selected, i.e. > $selectedcats = ar

Re: [PHP] populate form input option dropdown box from existing data

2009-06-18 Thread PJ
Stuart wrote: > 2009/6/18 PJ : > >> I snipped to make it short... continue at bottom... >> >>> Step back from the code and consider the steps you need to perform... >>> >>> 1) Get an array of the categories, ideally in the form $cats[] >&

Re: [PHP] populate form input option dropdown box from existing data

2009-06-18 Thread PJ
Ford, Mike wrote: > On 17 June 2009 15:01, PJ advised: > > >> It does, indeed. This confirms my inexperienced conclusion that >> in_array() does not work on associative arrays per se; it works on >> simple arrays and I just don't have the experience to think of

Re: [PHP] populate form input option dropdown box from existing data

2009-06-18 Thread PJ
Ford, Mike wrote: > On 17 June 2009 14:30, PJ advised: > > > >> For the moment, I am trying to resolve the problem of >> extracting a value >> from a string returned by a query. I thought that in_array() would do >> it, but the tests I have run on it are 100

Re: [PHP] Re: sloppiness & stupidity

2009-06-18 Thread PJ
Ford, Mike wrote: > On 17 June 2009 23:56, PJ advised: > > >> Nisse Engstr�m wrote: >> >>> On Wed, 17 Jun 2009 10:18:09 +0100, "Ford, Mike" wrote: >>> >>> >>> >>>> This is very true -- but XHTML requi

Re: [PHP] how to extract fields from associative array into different variables

2009-06-18 Thread PJ
Nisse Engström wrote: > On Tue, 16 Jun 2009 08:50:45 -0400, PJ wrote: > > >> Ashley Sheridan wrote: >> >>> On Mon, 2009-06-15 at 17:38 -0400, PJ wrote: >>> >>> >>>> Then I have to add some loopy thing to assign the value

Re: [PHP] how to extract fields from associative array into different variables

2009-06-18 Thread PJ
ono ato sekai desu. > > > > >> To: php-general@lists.php.net >> From: news.nospam.0ixbt...@luden.se >> Date: Thu, 18 Jun 2009 14:17:59 +0200 >> Subject: Re: [PHP] how to extract fields from associative array into >> different variables >> >>

[PHP] aesthetic beauty in conception, execution

2009-06-18 Thread PJ
I just thought I would share a revelation. Someone just pointed me to a site that IMHO is superb for elegance of artistic design and programming. I was blown away. http://www.apfq.ca You won't regret it. 8-) -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."

Re: [PHP] populate form input option dropdown box from existing data

2009-06-18 Thread PJ
Martin Scotta wrote: > It is a sintax error > > if (in_array($ex, $selected) <--- missing ) > echo "yes"; > else echo "no"; > > On Thu, Jun 18, 2009 at 10:13 AM, PJ <mailto:af.gour...@videotron.ca>> wrote: > >

Re: [PHP] Re: aesthetic beauty in conception, execution

2009-06-18 Thread PJ
Peter Ford wrote: > PJ wrote: > >> I just thought I would share a revelation. >> Someone just pointed me to a site that IMHO is superb for elegance of >> artistic design and programming. >> I was blown away. >> http://www.apfq.ca >> You won't reg

Re: [PHP] aesthetic beauty in conception, execution

2009-06-18 Thread PJ
Robert Cummings wrote: > PJ wrote: >> I just thought I would share a revelation. >> Someone just pointed me to a site that IMHO is superb for elegance of >> artistic design and programming. >> I was blown away. >> http://www.apfq.ca >> You won't reg

Re: [PHP] Re: aesthetic beauty in conception, execution

2009-06-18 Thread PJ
Shawn McKenzie wrote: > PJ wrote: > >> I just thought I would share a revelation. >> Someone just pointed me to a site that IMHO is superb for elegance of >> artistic design and programming. >> I was blown away. >> http://www.apfq.ca >> You won't

Re: [PHP] populate form input option dropdown box from existing data

2009-06-18 Thread PJ
Stuart wrote: > 2009/6/18 PJ : > >> Martin Scotta wrote: >> >>> It is a sintax error >>> >>> if (in_array($ex, $selected) <--- missing ) >>> echo "yes"; >>> else echo "no"; >>> >>>

Re: [PHP] aesthetic beauty in conception, execution

2009-06-18 Thread PJ
Robert Cummings wrote: > PJ wrote: >> Robert Cummings wrote: >>> PJ wrote: >>>> I just thought I would share a revelation. >>>> Someone just pointed me to a site that IMHO is superb for elegance of >>>> artistic design and programming. >>

[PHP] edit db fields

2009-06-18 Thread PJ
How to deal with pre-selected input fields. To edit db fields in a table, I have a page that is basically the same as an insert page to create entries in the db. The table displays all the entries for a particular book that is selected from a search page. From the search page results a link leads t

[PHP] sessions tutorial

2009-06-18 Thread PJ
ant to bother you guys but do you see the futility here? My little programs are advancing little by little, but boy is it a struggle to get any information. I eventually dig it out but, frankly, it might be more productive digging salt mines in the Urals. :-( PJ "the bitcher"

[PHP] resubmit form after validation error

2009-06-20 Thread PJ
I'm having a bit of a time figuring out how to resubmit a form after obligatory field missing error. The problem is that the page is accessed from a search page href where the uri is like = file.php$=123. Since the method="post" action="file.php?= does not work nor does PHP_SELF, I have set the act

Re: [PHP] resubmit form after validation error

2009-06-22 Thread PJ
o "update.php" and one to "delete.php" Maybe it's all cumbersome and maybe it is possible to streamline the whole process, but then it does work and I am just learning... :-) Thanks again. PJ Caner BULUT wrote: > Hi, > > You can use a variable to that. Like follow

Re: [PHP] resubmit form after validation error

2009-06-23 Thread PJ
Caner Bulut wrote: > Hi PJ, > > You can use the structure following > > $bid = htmlentities($_GET['id']); > the code below > if(empty($bid) { > $bid=0; > } produces an empty screen with no error messages... I have been having some trouble understanding "e

Re: [PHP] resubmit form after validation error

2009-06-23 Thread PJ
Shawn McKenzie wrote: > PJ wrote: > >> Caner Bulut wrote: >> >>> Hi PJ, >>> >>> You can use the structure following >>> >>> $bid = htmlentities($_GET['id']); >>> >>> >> the code below &g

[PHP] supplied argument errors

2009-06-23 Thread PJ
I think there is something I do not understand in the manual about mysql_fetch_assoc(), mysql_affected_rows() The code works, but I get these annoying messages. snippet: $result = mysql_query($sql, $db); // this is following an UPDATE $row = mysql_fetch_assoc($result); // warning...

[PHP] delete & insert ?

2009-06-23 Thread PJ
I just had a bright idea ??? Am doing editing file for book entries; it occurs to me (now that I am practically finished) that it might be much simpler to delete entries and just insert rather than going through the rigamarole of checking if the new entries exist and if and if and if... just delete

Re: [PHP] supplied argument errors

2009-06-23 Thread PJ
Lex Braun wrote: > > > On Tue, Jun 23, 2009 at 4:10 PM, PJ <mailto:af.gour...@videotron.ca>> wrote: > > I think there is something I do not understand in the manual about > mysql_fetch_assoc(), mysql_affected_rows() > The code works, but I get these an

[PHP] idiot proofing

2009-06-24 Thread PJ
I have a bit of a situation. I have set up addBooks, editBooks and deleteBooks pages. Before complicating my life & mixing them up in one file, I am running tests. I'd like to make them idiot proof, up to a point. When the page is submitted and the code is parsed, the form inputs remain on the scre

[PHP] exasperated again

2009-06-30 Thread PJ
Could somebody please explain to me what is wrong with this code? In my script it works, returns the correct id, but when I try it in a test pages, nothing in the world gets it to work. This is rather frustrating, again: THIS WORKS IN ANOTHER PAGE; IN THE TEST PAGE ID DOES NOT. $sql = "SELECT id FR

Re: [PHP] exasperated again - shot in the foot

2009-06-30 Thread PJ
PJ wrote: > Could somebody please explain to me what is wrong with this code? > In my script it works, returns the correct id, but when I try it in a > test pages, nothing in the world gets it to work. This is rather > frustrating, again: > THIS WORKS IN ANOTHER PAGE; IN THE TEST P

Re: [PHP] exasperated again - shot in the foot

2009-06-30 Thread PJ
Jay Blanchard wrote: > [snip] > Use the OOP interface to mysqli or PDO and these problems don't happen > [/snip] > > Either that or include a modicum of error checking in your code. > > OK, Ok, I feel stupid enough already. I'm not sure I want to get in that deep... it's tough enough with the s

Re: [PHP] exasperated again

2009-07-04 Thread PJ
Jim Lucas wrote: > PJ wrote: >> Could somebody please explain to me what is wrong with this code? >> In my script it works, returns the correct id, but when I try it in a >> test pages, nothing in the world gets it to work. This is rather >> frustrating, again: >&g

Re: [PHP] exasperated again

2009-07-04 Thread PJ
Ashley Sheridan wrote: > On Sat, 2009-07-04 at 10:47 -0400, PJ wrote: > >> Jim Lucas wrote: >> >>> PJ wrote: >>> >>>> Could somebody please explain to me what is wrong with this code? >>>> In my script it works, returns the

Re: [PHP] exasperated again

2009-07-04 Thread PJ
Stuart wrote: > 2009/7/4 PJ : > >> Ashley Sheridan wrote: >> >>> On Sat, 2009-07-04 at 10:47 -0400, PJ wrote: >>> >>> >>>> Jim Lucas wrote: >>>> >>>> >>>>> PJ wrote: >>>

Re: [PHP] exasperated again

2009-07-04 Thread PJ
Stuart wrote: > 2009/7/4 PJ : > >> Ashley Sheridan wrote: >> >>> On Sat, 2009-07-04 at 10:47 -0400, PJ wrote: >>> >>> >>>> Jim Lucas wrote: >>>> >>>> >>>>> PJ wrote: >>>

Re: [PHP] Simple login form with cookies

2009-07-06 Thread PJ
ure my login model (Using cookies or sessions). > > Hi Jason, I'm probably not any wiser than you, but I have just (today) discovered an interesting site that seems to have some really clear explanations and tutorials re php, MySsql et al. It's worth looking at (I'm trying

Re: [PHP] Simple login form with cookies

2009-07-07 Thread PJ
PJ wrote: > Jason Carson wrote: > >>> On Mon, Jul 6, 2009 at 02:19, Jason Carson wrote: >>> >>> >>>> ok, I have two sets of scripts here. One uses setcookie() for logging >>>> into >>>> the admin panel and the oth

Re: [PHP] Simple login form with cookies

2009-07-08 Thread PJ
Michael A. Peters wrote: > Daniel Brown wrote: >> First, a reminder to several (including some in this thread) that >> top-posting is against the law here. >> >> On Wed, Jul 8, 2009 at 09:48, Martin Scotta >> wrote: >>> $sql = 'SELECT * FROM your-table WHERE username = \''. $username .'\' >>> a

Re: [PHP] Simple login form with cookies

2009-07-08 Thread PJ
Andrew Ballard wrote: > On Wed, Jul 8, 2009 at 11:53 AM, PJ wrote: > >> Michael A. Peters wrote: >> >>> Daniel Brown wrote: >>> >>>> First, a reminder to several (including some in this thread) that >>>> top-posting is

Re: [PHP] Simple login form with cookies

2009-07-08 Thread PJ
Tony Marston wrote: > I do not follows rules which cannot be justified beyond the expression "It > is there, so obey it!" Why is it there? What are the alternatives? What harm > does it do? What happens if the rule is disobeyed? Damn, isn't life frustrating... in case no one has noticed, 99 % of

Re: [PHP] Simple login form with cookies

2009-07-08 Thread PJ
Paul M Foster wrote: > On Wed, Jul 08, 2009 at 03:23:49PM -0400, Bob McConnell wrote: > > >> From: Tony Marston >> >> >>> I do not follows rules which cannot be justified beyond the expression >>> >> "It >> >>> is there, so obey it!" Why is it there? What are the alternatives?

Re: [PHP] Obeying the rules (was Simple login form with cookies)

2009-07-09 Thread PJ
Tony Marston wrote: > There are too many people in this newsgroup with the idea that you MUST > obey the rules, whatever they are, WITHOUT QUESTION. I do not subscribe to > this notion. I have been working in IT (or DP as it was originally called) > for over 30 years, and in that time I have wo

[PHP] another pagination problem

2009-07-17 Thread PJ
I noticed the thread on pagination here just after posting to mysql. But I am using php/mysql ;-) I have some rather complicated ordering problems: 1. need to order by 2 fields title, sub_title 2. need to display 10 items per page (hundreds, if not 1000s or pages) 3. order by ASC or DESC makes

Re: [PHP] another pagination problem

2009-07-17 Thread PJ
Ashley Sheridan wrote: > On Friday 17 July 2009 16:35:10 PJ wrote: > >> I noticed the thread on pagination here just after posting to mysql. But >> I am using php/mysql ;-) >> I have some rather complicated ordering problems: >> 1. need to order by 2 fields

Re: [PHP] another pagination problem

2009-07-17 Thread PJ
Ashley Sheridan wrote: > On Friday 17 July 2009 16:35:10 PJ wrote: > >> I noticed the thread on pagination here just after posting to mysql. But >> I am using php/mysql ;-) >> I have some rather complicated ordering problems: >> 1. need to order by 2 fields

Re: [PHP] Is select_db necessary?

2009-08-12 Thread PJ
l another mysql_connect points to another db. I repeat the call with every query as a precaution. I'm not expert, but I thought I'd offer my observation and am open to correction. ;-) PJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] input form save and display conflict

2009-10-22 Thread PJ
I have several input fields to update a book database. There seems to be a conflict in the way tags and text are input through php/mysql and phpMyAdmin. If I enter the data with phpMyAdmin the input fields in the php page see quotation marks differently than what is input in phpMyAdmin. example: if

Re: [PHP] input form save and display conflict

2009-10-27 Thread PJ
Ashley Sheridan wrote: > On Thu, 2009-10-22 at 21:32 -0400, PJ wrote: >> I have several input fields to update a book database. There seems to be >> a conflict in the way tags and text are input through php/mysql and >> phpMyAdmin. If I enter the data with phpMyAdmin the input

[PHP] advice on setting up new site

2009-11-11 Thread PJ
e interested and we can discuss methods of working and payment... etc. 2. I would appreciate some suggestions about Unix programs that could be applicable to meet our needs. I look forward to hearing from from you :-) Questions are welcome ... so are investors ;-) PJ -- PHP General Mailing

[PHP] phpeclipse debugging & setup

2008-05-30 Thread PJ
e Bookmarks in phpEclipse? Are they meant to be breakpoints? Why does the PHPbrowser (internal) not work? Why does the preferences page not show PHP Web developing? Why is only MySQL included and not postgresql in the setup? Any suggestions, explanations, instructions, sources of information would be a

Re: [PHP] phpeclipse debugging & setup

2008-05-31 Thread PJ
Eric Butera wrote: On Fri, May 30, 2008 at 11:59 AM, PJ <[EMAIL PROTECTED]> wrote: Running FreeBSD 7.0, Eclipse SDK 3.3.2, java 1.6.0_03-p4, apache 2.2.8, php5.2.6, postgresql 8.3.1. I found that configuring Xdebug just does not work the way all the manuals, instructions and hints s

[PHP] no array passed error

2008-06-03 Thread PJ
I don't know if this is the right list, it seems php and postgresql are rather interdependent in the webside I am debugging :(, but here goes: I'm getting this error: pg_execute() [function.pg-execute]: No array passedE_WARNING for this line of code: if( !($r=pg_execute($dbh, $query)) )

Re: [PHP] PHP code will not work

2008-06-13 Thread PJ
Joseph Subida wrote: Daniel Brown wrote: On Wed, Jun 11, 2008 at 11:51 PM, Joseph Subida <[EMAIL PROTECTED]> wrote: Hi. I am new to PHP. I found a tutorial that said to copy and paste the code into a .php document and open it in my browser: I'm pretty sure PHP is enabled on my computer. I

[PHP] Problem with ftp_rmdir

2006-05-02 Thread PJ
Hello everybody, I'm using function ftp_rmdir to create some aplication and for testing I've used following sample from php.net if (ftp_rmdir($conn_id, $dir)) { echo "Successfully deleted $dir\n"; } else { echo "There was a problem while deleting $dir\n"; } Command really removed specif

[PHP] T1 Lib

2005-01-11 Thread PJ
Hello everybody! I have some connection problems when I am searching topics in ThunderB., so I am sorry if my question is somewhere answered! Does anybody know, where to download T1Lib for PHP4 - windows version? After half hour googling I have feeling that it doesn't exist... :o( So, I would b

[PHP] Problems with imap_open()

2006-02-14 Thread PJ
Hello everybody, I have problem with imap_open(). I've tried google - so I know, that many people have problem with this function - but I think that my problem is a little bit different or I haven't found any working answer :o( So I'm tring this forum... Please help me, if you can. My script

Re: [PHP] Problems with imap_open()

2006-02-14 Thread PJ
Richard Lynch napsal(a): On Tue, February 14, 2006 2:13 am, PJ wrote: Hello everybody, I have problem with imap_open(). I've tried google - so I know, that many people have problem with this function - but I think that my problem is a little bit different or I haven't found any work

<    1   2   3   4