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
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[]
>&
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
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
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
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
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
>>
>>
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."
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:
>
>
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
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
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
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";
>>>
>>>
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.
>>
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
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"
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
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
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
Shawn McKenzie wrote:
> PJ wrote:
>
>> Caner Bulut wrote:
>>
>>> Hi PJ,
>>>
>>> You can use the structure following
>>>
>>> $bid = htmlentities($_GET['id']);
>>>
>>>
>> the code below
&g
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...
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
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
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
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
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
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
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
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
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:
>>>
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:
>>>
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
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
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
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
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
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?
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
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
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
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
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
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
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
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
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
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
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)) )
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
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
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
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
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
301 - 353 of 353 matches
Mail list logo