@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36



Comments:

<0> zircu: look at his array.
<1> then to separate by the = ?
<1> zircu one sec let me pull up php doc on it
<0> I disagree with you on that 1.
<2> s/1/one
<3> is it better to use javascript or php to redirect a page if they are both easily as accessible in the current context
<4> i think zircu has the right idea
<0> PHP
<5> Donkano: that's exactly what parse_str does? parse_str($string, $aArray)
<0> JavaScript can be disabled.
<1> ah wow zircu thank you very much that function is awesome, just what i need hehe
<3> hmm true
<6> Donkano: so you do foreach(explode($str) as $i=>$c) $str{$i]}= strtolower($c); instead
<6> ?
<3> so how would you redirect a page after you click a button
<3> since page is already loaded



<4> rogerg that's more javascript
<6> rogerg: via javascript usually
<0> Have that button as a submot button
<0> And have it submit to itself
<0> And Header("Location: <place to go to>");
<0> s/submot/submit
<7> hey guys. I'm writing a PHP app that has a login page and steps to order products. Is the best move to use cookies for the login and sessions for the shopping cart?
<3> i dont like the way its repainting the screen when i use window.location
<3> im wondering if header() will be any different
<2> jbrimble: Why don't you use session for all?
<4> jbrimble.. i'm a cookie kind of guy
<4> just make sure you encrypt
<2> TestiCalls: That's dumb.
<4> ok
<4> that's a nice response..
<3> $_SESSION rocks :D $_COOKIE rocks, use them both where neede
<3> needed
<4> where's the op when you need 'em
<2> Not to mention accurate
<7> Thanks guys. So the best option is to either choose one or the other, not use them both?
<8> hey
<4> get booted last night for being that witty
<8> why does $_COOKIE["defualt_theme"]; ouput Array( ) when it is set cleary, no spelling errors, in my browser?
<0> I recommend to use sessions.
<8> i mean when I print_r($_COOKIE);
<4> what browser surfdue
<3> sessions are without a doubt safer
<8> firefox
<7> That's what I was thinking, Donkano
<8> rogerg ya but this is for a theme.
<8> set a theme
<8> ;)
<8> i want it to stay with them understand kinda ?
<4> you know .. sessions are handled both in cookie and in the url... i never said to just use blindly the cookie... use sessions with cookie.. as long as it's encrypted
<8> its not a p*** or anything
<3> TestiCalls: but if cookies are disabled....sessions still work
<4> try and catch
<4> that's what it's for
<9> mysql_connect("xxxx", "xxx", "xxxxx");
<3> why do that when you can use sessions
<9> Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
<3> and forget about cookies
<9> why do i get this error
<4> url munging
<9> i am trying to use tcp/ip
<4> what if i gave you a url with sessionid in it
<4> you could hijack my session
<9> but it says cannot connect to local sock
<3> not if coded correctly :D
<7> is the basic usage of sessions the same in PHP5 as it is in 4?
<4> i know
<9> rogerg: whats the error?
<4> but if someone comes in here and asks what to use cookie or session... obviously they may not cover that aspect
<3> what im confused
<3> if they come in here to ask whether to use a cookie or session, they need to find out for themselves on php.net
<4> lol
<3> because IRC is not the place to fully understand either
<4> right
<3> :)
<9> mysql_connect("xxxx", "xxx", "xxxxx");
<9> Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)



<9> i am trying to use tcp/ip
<9> but it says cannot connect to local sock
<4> sockets are tcp
<4> and udp
<4> etc
<8> ok i set $_SESSION['defualt_theme'] = $theme; yet it dosnt show as i did.
<10> dfdf: what are youu using for your hostname?
<2> dfdf: Is your SQL configured properly?
<9> TestiCalls: I am trying to connect to remote server
<3> dfdf: thats more of a mysql question #mysql
<9> I can vonnect with mysql client
<9> but not with php
<4> what's the address and port, and does that remote has the port open
<3> php.ini
<3> :)
<4> what version of mysql
<3> rofl
<9> Thats why i said i can aconnect with mysql client
<2> dfdf: php.net/mysql_connect
<10> dfdf: iirc, if you use 'localhost' it will try to use a named pipe. if you use '127.0.0.1' it will use TCP/IP
<9> with same username and p***word
<4> dfdf, what's the mysql version?
<9> caffinated: its not localhost but another ip
<9> 4.1
<10> mkay
<4> you using mysqli or mysql functions?
<0> cafifnated: I understood it as that 127.0.0.1 was local intranet.
<9> TestiCalls: i didt get that
<0> Not nessicarily TCP/IP
<10> Donkano: yes, but there is a subtle difference where mysql's libraries are concerned.
<1> alright good deal I got it thank you everybody
<10> and if you do anything with 127.0.0.1 you're still accessing a network. it does not matter that it's the local network.
<11> Is there a way to strip all JS from html?
<10> echeese: not easily.
<3> regex
<11> including onclick and href="javascript:
<4> caffinated, if on windows the 127.0.0.1 doesn't get out of the computer... it's a loopback socket...
<4> and microsoft has it locked as so
<9> what could be the problem
<10> TestiCalls: it's still a network call.
<3> heh if its JS embedded in the html, not in <script></script> that would be a bitch
<4> dfdf
<4> http://us3.php.net/manual/en/ref.mysqli.php
<4> use mysqli
<12> What is a good way to verify an email address when someone signs up on my newsletter signup page? Is there a way to verify the email address without having to send them a confirmation email?
<3> because you have onclick, onmouseover, onmousedown, href, onload, etc, etc, etc
<4> can do a quick javascript check instead of letting the server handle the check
<10> TestiCalls: we're talking about the differences in the protocols used here, not the eventual destinations ;)
<4> ah
<3> ChrisC35: send them a confirmation email
<3> :P only way that truly 100% verifies it
<3> there is no other way that you could possibly 100% verify it :D
<3> ChrisC35: do you know their email provider, or are there random ones
<2> TestiCalls: 127.0.0.1 is a loopback network interface *everywhere*
<12> what are the other ways? I ask because the service my client used says they 'verified new emails upon signup, all emails in the db have had at least one successful email from them' - however when I test it out on their system, I do not get a confirmation email, I just get a welcome marketing type email wint an unsubscribe link
<9> TestiCalls: why is it that the error popsup in this case
<4> chrisc35, you can verify javascript to make sure it's a real email (aka somethinghere@asomething.com), try and grab something from 'asomething.com' (using ajax).. if respond is good then check for somethinghere and for the @... then you can p*** it to php to send the verification email
<4> dfdf, i'm not exactly sure but i know for sure that 4.1 works with mysqli, and it's better and faster functions
<3> only way would be to submit that email to the domain and see what the domain returns, ie, not a valid email, or email valid but incorrect p***word
<3> but there are only 500,000,000 email providers out there
<3> so that wouldn't work too well
<4> lol you're slow Wolf
<4> and btw, my point was that you can sniff the 127.0.0.1 but it's desination never leaves the computer or leaves the protocol to be sniffed... so it's not the same "everywhere"
<4> rogerg, he could always jump on the "no hotmal, or yahoo" accounts
<4> heh
<12> rogerg random ones
<3> yeah that ****s
<10> TestiCalls: i understand what you mean, it's just not relevant to the conversation.
<3> no way to verify it, you could get some educated guesses
<4> yeah
<3> but no true way without sending it
<4> misunderstood caff..
<4> i dropepd it but wolf brought it back up
<10> it's IRC, misunderstanding is half the fun


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

downgrade gaim
suse 10 make menuconfig
#sql
package php4_pear
kde welan
#mysql
gentoo USE browserplugin
recreate x11.conf
gentoo gst gnomevfssink
#suse



Home  |  disclaimer  |  contact  |  submit quotes