RE: [PHP] Re: Tricky array question

2002-02-05 Thread Niklas Lampén

I think you should ignore that. I use it all the times, and it works
fine.


Niklas


-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]] 
Sent: 5. helmikuuta 2002 12:37
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Tricky array question


Hello Rainer,

what kind of disadvantages do I take with me, if my form does not
validate? Is this a problem because of the spiders, or the
functionality?

It works fine so far on all browsers I know.

Can you please give more details?

Thanx Andy


Rainer [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Andy,

 I was just reading your message, do I see that you send an array with 
 a form? Like input name=glacier[x] ?
 I just wanted you to know that using brackets [] is not allowed in the
 html-name attribute! Your html-page will not validate :(

 The sollution is sending al your vars as simple vars (no array) and
collect
 them with HTTP_GET_VARS[] or HTTP_POST_VARS[], php-variables.

 Maybe this will also be a sollution for your problem... just take a 
 look from another point of view :)

 Cheers,
 Rainer.


 Andy [EMAIL PROTECTED] wrote in message 
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi there,
 
  I have a tricky array question.
 
  My app is passing via post a array variable called glacier. Now I am

  checking for the content of this array. Because there are more of 
  those arrays, I am getting all
 the
  names out of a db.
 
  How is it possible to get the value and keep the name of the array
 dynamic?
 
  e.g:
  Array name passed by post is:
$glacier
//
  contains e.g. $glacier[0] = testname
  Array with category names coming out of db is:   $category //
contains
 e.g.
  $category[0] = glacier
 
   echo $categories[0]; // returns glacier
   echo $glacier[0];  // returns testname
 
  I tryed $categories[0][0] but it returns only the first letter of
glacier
  (g)
 
  Any ideas??
 
  Thanx, Andy
 
 
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Tricky array question

2002-02-05 Thread val petruchek

Hello!

a have following mysql problem:
i need to execute several inserts at one query like this-

$sql-action(insert into words(word) values ('php');
insert into words(word) values ('general');
insert into words(word) values ('list'););

The word fild is unique

My problem is: when certain word (e.g. 'php') already exists in table words
all the query fails

I do not want to check every word on existance and then insert only new
words.

I want mysql to ignore fails. How can i do it?

Thanx

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Tricky array question

2002-02-05 Thread Andy

Put an @ infront of your comand

Andy


Val Petruchek [EMAIL PROTECTED] schrieb im Newsbeitrag
000801c1ae32$6fc1e360$[EMAIL PROTECTED]">news:000801c1ae32$6fc1e360$[EMAIL PROTECTED]...
 Hello!

 a have following mysql problem:
 i need to execute several inserts at one query like this-

 $sql-action(insert into words(word) values ('php');
 insert into words(word) values ('general');
 insert into words(word) values ('list'););

 The word fild is unique

 My problem is: when certain word (e.g. 'php') already exists in table
words
 all the query fails

 I do not want to check every word on existance and then insert only new
 words.

 I want mysql to ignore fails. How can i do it?

 Thanx

 Valentin Petruchek (aki Zliy Pes)
 http://zliypes.com.ua
 mailto:[EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php