[PHP] Accessing multi-word properties

2011-02-20 Thread Florin Jurcovici
Hi. I have a JSON, let's say "{\"a b\": 13}". json_decode() handles it properly. However, then resulting object has a property composed of two words. What I did to access this property was the following: $json = "{\"a b\": 13}"; $decoded = json_decode($json); $tag = "a b"; print($decoded->$tag)

[PHP] Re: 9970318527584

2011-02-20 Thread Vlatko Šurlan
John Taylor-Johnston wrote: 9970318527584 Could this number refer to a date()? In late 2009? How could I calculate it? How did you get the number? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Accessing multi-word properties

2011-02-20 Thread bender
Am 20.02.2011 11:32, schrieb Florin Jurcovici: Hi. I have a JSON, let's say "{\"a b\": 13}". json_decode() handles it properly. However, then resulting object has a property composed of two words. What I did to access this property was the following: $json = "{\"a b\": 13}"; $decoded = json_d

Re: [PHP] Array from one form to other?

2011-02-20 Thread Tamara Temple
On Feb 19, 2011, at 6:38 PM, Yogesh wrote: I have two forms. One form helps read an input file into an array. And the other form needs this array as an input. I am able to read the input file into an array, but how do I pass it over to the other form. Both forms have PHP file as 'action'.

Re: [PHP] Array from one form to other?

2011-02-20 Thread Yogesh
Hi Tamara, I don't entirely understand this; Dan Brown gave you solution to use curl to >> pass the array to the second "form" (do you mean script here?). That would >> certainly work, but I'm wondering if it wouldn't be more secure to spool out >> the array to a file from the first script after

[PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Nazish
Hi there, I am creating a login page for my website. The users' information will be stored in a MySQL database. I have a registration form on my home page, and a separate file called "login.php" to process the user values. However, the entries are not going to the MySQL database (however, the valu

Re: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Daniel Brown
On Sun, Feb 20, 2011 at 12:55, Daniel Brown wrote: > On Sun, Feb 20, 2011 at 12:53, Daniel Brown wrote: >> >>    If the value isn't that of your database password, there's your >> problem: register_globals.  A simpler way is to check the output of >> phpinfo(); to see if register_globals is enabl

Re: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Donovan Brooke
This is probably a post better sent to the php-db list... but Whenever you work with MySQL, it's good to retrieve the actual error from mysql to help you troubleshoot. I posted this php_mysql lib a while back which is what I used on my last project. http://www.euca.us/downloads/euca_phpmysq

Re: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Andre Polykanine
Hello Nazish, first of all, I'd suggest you to remove all of the quotes around the variables: mysql_connect($host, $user, $password) or die("could not connect!"); the same is to be done with the query itself. Second, add an "or die" to the query: mysql_query($insert) or die ("Unable to a

Re: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Nazish
Thanks everyone! However, when I click the "submit" button, the url simply moves to http://localhost/login.php (from home.php) and it is a blank page (apart from asking whether it should remember the password for future use). The values still do not move to the database. I included most of your su

Re: [PHP] Connection Handling - unreliable at best?

2011-02-20 Thread James Green
Hm. Commented out the line & re-tested. Absolutely no change whatsoever :( Even made it false. I'm really hoping I've been an idiot on this one. Makes no sense otherwise but this is where I am. Hope to hear further suggestions. James On 20 February 2011 03:05, Daniel Brown wrote: > On Fri, Fe

Re: [PHP] New to list and to PHP

2011-02-20 Thread tedd
At 2:03 PM -0500 2/18/11, Pete Woodhead wrote: Hi I'm Pete Woodhead. I'm new to the list and to PHP. To be honest I very new to code writing. Thought this would be a good way to learn good habits as well as good code writing. Looking forward to learning and participating. Pete: Welcome to th

Re: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Nazish
Update: I added "echo" statements after mysql_connect and mysql_select_db to check where the code was broken. These statements show up on the login.php page after submitting the form, which means the MySQL connection works. So, the problem seems to lie with the *$insert *query... ideas? On Sun,

Re: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Nazish
Issue resolved! It turned out to be the use of quotations. Instead of double quotations to surround the $insert variable, it worked with single quotations: $insert = ' INSERT INTO user_info (login,password) VALUES ("'.$login.'", "'.$password.'") ' ; With the real_escape_str

Re: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Andre Polykanine
Hello Nazish, Try to do the following in your login.php: $login$password$insert"; So we'll see the result. -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule F

Re: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Andre Polykanine
Hello Nazish, Echo the $insert variable. -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion Original message From: Nazish To: p

RE: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread admin
I see an errors in the syntax. $insert = "INSERT INTO user_info (login, password) VALUES ('".mysql_real_escape_string($login)."',"'.mysql_real_escape_string($passwor d)."')"; Issues resolved. $insert = "INSERT INTO user_info (login, password) VALUES ('".mysql_real_escape_string($login)."','".mysq

Re: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Tamara Temple
I'm wondering if anyone is going to comment on the transmittal and storage of plain text passwords -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Andre Polykanine
Hello Tamara, :-)) I assume that was a testcase... -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion Original message From: Tam

Re: [PHP] Array from one form to other?

2011-02-20 Thread Tamara Temple
On Feb 20, 2011, at 10:51 AM, Yogesh wrote: I don't entirely understand this; Dan Brown gave you solution to use curl to pass the array to the second "form" (do you mean script here?). That would certainly work, but I'm wondering if it wouldn't be more secure to spool out the array to a fi

Re: [PHP] Re: 9970318527584

2011-02-20 Thread Richard Quadling
On 20 February 2011 12:24, Vlatko Šurlan wrote: > John Taylor-Johnston wrote: >> >> 9970318527584 Not an ISBN number. In fact Google only shows this thread for this number. The hex value is uninspiring 0x911654B4C60 As is the octal 0221054522646140 and binary 10010001000101100101010010110100110

Re: [PHP] New to list and to PHP

2011-02-20 Thread Richard Quadling
On 20 February 2011 23:34, Richard Quadling wrote: > On 18 February 2011 19:03, Pete Woodhead wrote: >> Hi I'm Pete Woodhead.  I'm new to the list and to PHP.  To be honest I very >> new to code writing. >> Thought this would be a good way to learn good habits as well as good code >> writing. >>

Re: [PHP] New to list and to PHP

2011-02-20 Thread tolga
21.02.2011 01:41, Richard Quadling yazmış: On 20 February 2011 23:34, Richard Quadling wrote: On 18 February 2011 19:03, Pete Woodhead wrote: Hi I'm Pete Woodhead. I'm new to the list and to PHP. To be honest I very new to code writing. Thought this would be a good way to learn good habits

Re: [PHP] New to list and to PHP

2011-02-20 Thread Richard Quadling
On 18 February 2011 19:03, Pete Woodhead wrote: > Hi I'm Pete Woodhead.  I'm new to the list and to PHP.  To be honest I very > new to code writing. > Thought this would be a good way to learn good habits as well as good code > writing. > Looking forward to learning and participating. > Assume th

Re: [PHP] New to list and to PHP

2011-02-20 Thread Tamara Temple
On Feb 20, 2011, at 5:51 PM, tolga wrote: 21.02.2011 01:41, Richard Quadling yazmış: On 20 February 2011 23:34, Richard Quadling wrote: On 18 February 2011 19:03, Pete Woodhead wrote: Hi I'm Pete Woodhead. I'm new to the list and to PHP. To be honest I very new to code writing. Thoug

Re: [PHP] New to list and to PHP

2011-02-20 Thread tolga
21.02.2011 03:21, Tamara Temple yazmış: On Feb 20, 2011, at 5:51 PM, tolga wrote: 21.02.2011 01:41, Richard Quadling yazmış: On 20 February 2011 23:34, Richard Quadling wrote: On 18 February 2011 19:03, Pete Woodhead wrote: Hi I'm Pete Woodhead. I'm new to the list and to PHP. To be hon

Re: [PHP] New to list and to PHP

2011-02-20 Thread Tamara Temple
On Feb 20, 2011, at 7:38 PM, tolga wrote: 21.02.2011 03:21, Tamara Temple yazmış: On Feb 20, 2011, at 5:51 PM, tolga wrote: i'm interested in php about 3 maybe 4 years but i still couldnt get the logic of classes. it makes no sense to me. i couldnt understand whats about classes good at o

Re: [PHP] New to list and to PHP

2011-02-20 Thread Mujtaba Arshad
better yet: http://lmgtfy.com/?q=explanation+of+classes+in+php On Sun, Feb 20, 2011 at 9:39 PM, Tamara Temple wrote: > > On Feb 20, 2011, at 7:38 PM, tolga wrote: > > 21.02.2011 03:21, Tamara Temple yazmış: >> >>> >>> On Feb 20, 2011, at 5:51 PM, tolga wrote: >>> i'm interested in php about

Re: [PHP] New to list and to PHP

2011-02-20 Thread tolga
ahaha lol. the point of my ask here is that i want to find a trusted source, not seo based web sites with no info inside. but thats cool. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] New to list and to PHP

2011-02-20 Thread Eric Butera
On Sun, Feb 20, 2011 at 8:38 PM, tolga wrote: > 21.02.2011 03:21, Tamara Temple yazmış: >> >> On Feb 20, 2011, at 5:51 PM, tolga wrote: >> >>> 21.02.2011 01:41, Richard Quadling yazmış: On 20 February 2011 23:34, Richard Quadling  wrote: > > On 18 February 2011 19:03, Pete Woodhe

[PHP] HTTP Authenticaion Query

2011-02-20 Thread Ashim Kapoor
Hello {$_SERVER['PHP_AUTH_USER']}."; echo "You entered {$_SERVER['PHP_AUTH_PW']} as your password."; } ?> Dear All, Above is a code example from php.net http://php.net/manual/en/features.http-auth.php What I am left wondering is the SEQUENCE OF FLOW of logic here. Assume a page has ONLY thi

Re: [PHP] HTTP Authenticaion Query

2011-02-20 Thread Peter Lind
On 21 February 2011 06:27, Ashim Kapoor wrote: >   if (!isset($_SERVER['PHP_AUTH_USER'])) { >    header('WWW-Authenticate: Basic realm="My Realm"'); >    header('HTTP/1.0 401 Unauthorized'); >    echo 'Text to send if user hits Cancel button'; >    exit; > } else { >    echo "Hello {$_SERVER['PHP_

Fwd: [PHP] HTTP Authenticaion Query

2011-02-20 Thread Ashim Kapoor
-- Forwarded message -- From: Ashim Kapoor Date: Mon, Feb 21, 2011 at 12:46 PM Subject: Re: [PHP] HTTP Authenticaion Query To: Peter Lind You are tired and not thinking straight. HTTP is a stateless thing: 1. > you request the page, but you're not authorized, hence you hit the