[PHP] array sorting

2005-03-27 Thread Merlin
Hi there, I would like to save some db power by putting values into a file which are often used. They basicly populate a select field. So I placed those values into associative arrays: $code[language] = array("1"=> "php", "2"=> "asp"); Now I would like to sort those for displaying after my prefer

[PHP] Converting hexadecimal string

2005-03-27 Thread Ashley M. Kirchner
Short (possibly simple) question: How do I convert a hexadecimal string back into it's ascii representation? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Illegal string offset error in array

2005-03-27 Thread James Kaufman
On Mon, Mar 28, 2005 at 11:29:28AM +1200, Jasper Bryant-Greene wrote: > Rasmus Lerdorf wrote: > >>>Jasper Bryant-Greene wrote: > You can't access string offsets with square brackets [] in PHP5. You > need to use curly braces {} instead. > >>> > >>>Not sure where you got that idea. This is

Re: [PHP] Re: Illegal string offset error in array

2005-03-27 Thread Rasmus Lerdorf
Jasper Bryant-Greene wrote: Rasmus Lerdorf wrote: Jasper Bryant-Greene wrote: You can't access string offsets with square brackets [] in PHP5. You need to use curly braces {} instead. Not sure where you got that idea. This is not true. -Rasmus Actually, it is. See the following URL: http://www.

Re: [PHP] Re: Illegal string offset error in array

2005-03-27 Thread Jasper Bryant-Greene
Rasmus Lerdorf wrote: Jasper Bryant-Greene wrote: You can't access string offsets with square brackets [] in PHP5. You need to use curly braces {} instead. Not sure where you got that idea. This is not true. -Rasmus Actually, it is. See the following URL: http://www.php.net/manual/en/language.typ

Re: [PHP] Re: Illegal string offset error in array

2005-03-27 Thread Rasmus Lerdorf
Jasper Bryant-Greene wrote: Rasmus Lerdorf wrote: Jasper Bryant-Greene wrote: You can't access string offsets with square brackets [] in PHP5. You need to use curly braces {} instead. Not sure where you got that idea. This is not true. -Rasmus Actually, it is. See the following URL: http://www.

Re: [PHP] Re: Illegal string offset error in array

2005-03-27 Thread Jasper Bryant-Greene
Rasmus Lerdorf wrote: Jasper Bryant-Greene wrote: You can't access string offsets with square brackets [] in PHP5. You need to use curly braces {} instead. Not sure where you got that idea. This is not true. -Rasmus Actually, it is. See the following URL: http://www.php.net/manual/en/language.typ

Re: [PHP] Re: Illegal string offset error in array

2005-03-27 Thread Rasmus Lerdorf
Jasper Bryant-Greene wrote: Johannes Findeisen wrote: Hello all, sorry if this has been asked allready but i didn't find any usefull information in the web. Why is this function not working in PHP5? [snip] /* * This line does n

[PHP] Re: Still fighting setcookie

2005-03-27 Thread Jasper Bryant-Greene
Jasper Bryant-Greene wrote: [snip] function setcookie2($name, $value="", $expire="", $path="", $domain="", $secure=false) { $_COOKIES[$name] = $value; return setcookie($name, $value, $expire, $path, $domain, $secure); } [snip] Sorry, that should be: $_COOKIE[$name] = $value; -- Jasper Br

[PHP] Re: Still fighting setcookie

2005-03-27 Thread Jasper Bryant-Greene
John Hinton wrote: OK, I created this most simplistic script.. [snip] I would expect the return on action=1 to report the set cookie, but instead, it has no data. If I then reload the browser, the cookie appears. How can I get the cookie to set without this reload? What am I missing? Thanks a

[PHP] mysql_fetch_row not working?

2005-03-27 Thread mikeytf
'.$get_cat[1].''.$get_board[1].''.$get_board[2].''.$get_board[3].''.$get_board[4].''.$get_board[5].''; ?> That is in my index file. This is my index: http://subzer0.net/php There are 2 categories in the db and 4 boards. I don't know why they aren't showing! >_< Please help! ~Mike

[PHP] Re: Illegal string offset error in array

2005-03-27 Thread Jasper Bryant-Greene
Johannes Findeisen wrote: Hello all, sorry if this has been asked allready but i didn't find any usefull information in the web. Why is this function not working in PHP5? [snip] /* * This line does not work in PHP5 cause off a

[PHP] Re: Getting values from the Javascript namespace

2005-03-27 Thread Jasper Bryant-Greene
Daniel Lahey wrote: Is there any way to get values from the Javascript namespace into PHP? I want to use a value passed into a Javascript function in a query within some PHP code in the function which is used to dynamically populate a select's options. TIA JavaScript is parsed on the client si

Re: [PHP] world write access

2005-03-27 Thread Evert | Rooftop Solutions
Thanx Johannes, how about making the webserver the owner of the files? Would that be a good idea? The problem is that I have a framework deployed at several clients. Because this are some big clients and demand high security they won't give me a login to their ftp or consoles. Understandable, bu

[PHP] Maximum Execution Time Exceeded

2005-03-27 Thread mikeytf
I would like to know if you could help me.. I don't understand what is wrong! I made a file that is supposed to list 2 categories with the boards that go to them under them. I get a Fatal Error: Maxmimum execution time of 30 seconds exceeded. Here is the file that gives me the error: http:/

Re: [PHP] setcookie issue

2005-03-27 Thread Chris Shiflett
John Hinton wrote: The thing is, on the next action switch print_r($_COOKIE); returns empty until I refresh the browser. So, thusly, the second page load brings in the cookies. $_COOKIES is a convenient array that contains the contents of the Cookie header, nicely parsed. Whenever you set a cooki

[PHP] Still fighting setcookie

2005-03-27 Thread John Hinton
OK, I created this most simplistic script.. Begin Script--- define (Login, 0); define (DataReturn, 1); function login() { echo ""; echo "Type value: "; echo ""; echo ""; } function datareturn(){ print_r($_COOKIE); echo " is the \$_COOKIE data"; } if (e

Re: [PHP] world write access

2005-03-27 Thread Johannes Findeisen
Hello, It is generally not a good idea to make scripts to everybody writeable. I think that if you're implementing auto-update features in PHP scripts they only could be insecure. Okay, you have one more feature but what if this feature goes out of control? Be really carefull when writing such

[PHP] trustudio - eclipse IDE + CVS

2005-03-27 Thread D_C
I am using the trustudio IDE (an eclipse plugin basically) it has a really nice feature where it will give popups for argument list for your functions. however, when i am using a project from CVS rather than the local file system, this breaks, and i get an error "The resource is

[PHP] world write access

2005-03-27 Thread Evert - Rooftop Solutions
Hi people, I'm trying to think of a way to make an auto-updater for my distributed scripts. If I wanted to do this, I'd have to give write access to the php scripts to the apache user or world. Everywhere I read that you shouldn't to that, but I'm thinking that if you script your stuff right, th

[PHP] Re: Avoiding SQL injections: htmlentities() ?

2005-03-27 Thread Raj Shekhar
<[EMAIL PROTECTED]> writes: > > So if I could broaden the question and ask, in general, what people > recommend for pre-processing data before it goes into a SQL > statement.. for security and for things like making sure > singlequotes and other special characters are escaped properly? > > > h

[PHP] Illegal string offset error in array

2005-03-27 Thread Johannes Findeisen
Hello all, sorry if this has been asked allready but i didn't find any usefull information in the web. Why is this function not working in PHP5? function getNavigationContent($content_path) { $i = 0; $dir = opendir($content_path); while ($file = readdir ($dir)){ if ($fil

[PHP] Re: So this isnt a bug?

2005-03-27 Thread Aaron
Ive made it clear. If I use the success_box function that uses java to redirect it works perfectly, but if I use the header command the variables are stripped. This is only when a $_FILE is passed. "A. S. Milnes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> Aaron wrote: >> h

[PHP] Getting values from the Javascript namespace

2005-03-27 Thread Daniel Lahey
Is there any way to get values from the Javascript namespace into PHP? I want to use a value passed into a Javascript function in a query within some PHP code in the function which is used to dynamically populate a select's options. TIA -- PHP General Mailing List (http://www.php.net/) To unsu