logs archiveIRC Archive / Freenode / #php / 2006 / February / 6 / 1
jwillms
thanks dangermouse!
ico2
BigE: btw, that regex coach thing looks useful
downloading now
[jrl]
Ok, this is crap, php is changing my . into a _ because it wants to support register globals; is there anyway to fix this stupidity?
ico2
AH!!!!
simple soloution
put a - between type and scope
then explode
it suddenly becomes easy
Stormchaser
[jrl]: the . / _ has nothing to do with register_globals
ico2
i should have thought of that before
thanks bigE, will check out that regex coach anyway
[jrl]
Stormchaser: sure looks like it does
toggg
stupid or idiot ?
Stormchaser
[jrl]: What makes you think that?
         

GarethAdams
[jrl]: that's normal PHP form behaviour
[jrl]
Stormchaser: http://ca3.php.net/variables.external, dots in incoming names part
GarethAdams
because . isn't a valid variable name character
[jrl]
GarethAdams: Yeah, and thats a register globals problem
Stormchaser
[jrl]: I am aware of that.
HolyGoat
I hate how javascript treats arrays of form elements.
GarethAdams
not related
[jrl]
GarethAdams: its related because w/o register globals, the . would simply be in an array index, and you can have dots in array indexes
aurora
hi macca
Macca`
hi aurora
you smell nice today. is that chanel?
Stormchaser
o.O
aurora
heh
Dangermouse
lol
aurora
a cocoanut and lime perfume I found, actually :)
HolyGoat
Hmm. Apparently at my new job managers push employees to take up their vacation days. Better get myself a laptop and spend some time in italy :)
Stormchaser
HolyGoat: Seen italy. Not bad, but wouldn't want to live there.
Tokeiito
why?
HolyGoat
The pictures were nice so far.
Dangermouse
Stormchaser: Are you disrespecting Italy?
HolyGoat
heh
         

Dangermouse
Dont be surprised if you find a horses head in your bed tonight ¬_¬ !
Stormchaser
Dangermouse: I never said I disrespect it, but I wouldn't live there.
HolyGoat
I fail to see why I'd be surprised if I'd find a horses head in my bed.
It happens to me all the time.
Stormchaser
lol
aurora
hehe
Dangermouse
:P Neither would I...mainly because my family live there =)
aurora
poor horses o.o
HolyGoat
Ohhh any mafia members?
Dangermouse
I couldn't possibly disclose that information :p
HolyGoat
aurora: Yeah, if I find out who does that all the time, man.
Dangermouse
no :(
itrebal
HolyGoat: if he says no, there probably are, if he says yes, he wont be comming back again
Dangermouse
lol
Stormchaser
lol
HolyGoat
heheh
Dangermouse
Well, my aunties are pretty scary...
itrebal
lol
Dangermouse
"Aaah bambino! *cheek squeeze*"
HolyGoat
It'd be nice to do some godfatherish things while I'm on vacation. Except getting killed of course.
itrebal
hehe
HolyGoat
they have moustaches?
itrebal
right... except that dieing part
Dangermouse
haha..
aurora
heh
Stormchaser
Fun... When I was translating a site from single-language to multilanguage (template), I managed to miss one page (out of 7) COMPLETELY.
Dangermouse
tool.
itrebal
hehe
ico2
how do i capitalise the first char of a string?
Stormchaser
ucfirst()
itrebal
ucfirst IIRC
ico2
thanks Stormchaser, itrebal
itrebal
mmhmm
Jymmm
ownagesbot|meh you a bot?
ownagesbot|meh
nope
itrebal
Jymmm: i am
Jymmm
ownagesbot|meh how many fingers am I holding up
Dangermouse
lol
ownagesbot|meh
i'll take a guess.. 6?
Jymmm
close enough.
itrebal s/bot/bi**h/
itrebal
Jymmm: oh... right, sorry, i always get the two confused
Jymmm
lol
itrebal
i need to delete some pictures..
BlackShuck
Anyone got a good example of how to use multiple select listboxes on a form, and populate a MySQL DB ENUM type? I'm kinda new to this PHP lark, most of the stuff I have done so far works, but the Multi-Select ENUM always comes across blank.. :-(
Do I need to handle or parse it somehow in the SQL query?
JoJoFAN
is there some way to count the total number of rows in a table, the total number of rows with column=1, and # of rows with column2=1 with one select statemtn?
sdwrage
hey all
:)
someone told me to come here because it is the official php channel and you guys could help
Stormchaser
There is no such thing as "official PHP support channel"
sdwrage
ok well then he lied :P
hopefully you guys can still help :)
Stormchaser
or being misinformed
itrebal
but we are generally a decent one, as long as you dont piss us off :)
Stormchaser
!+g1
sdwrage
no prob ^-~
php-bot
Guideline #1) Don't ask to ask, Don't state: "I have a question", Don't ask: "Is anyone around?" or "Can anyone help?". Just Ask The Question
sdwrage
sure thing
I want to import an element from my xml document to my PHP script so that I can append a child. Im having a bit of trouble getting that to work
lemme post what I do have :)
itrebal
are you using DOM or simpleXML?
Stormchaser
pasteBIN it, please
GarethAdams
if it's more than 2 lines, use pastebin
sdwrage
ya I am
http://pastebin.com/540784 <- is my script that appends a child to the xml document that was created by this script -> http://pastebin.com/540644
but its giving me a fatal error
Fatal error: Call to a member function appendChild() on a non-object in C:\server\xampp\htdocs\DMproj\test2.php on line 12
Stormchaser
what fatal error?
GarethAdams
what error?
oh
sdwrage
Im not understanding a concept
Stormchaser
there is no function appendChild()... There is append_child, tho
sdwrage
0_o
aurora
there is an appendChild in php5
Dangermouse
"DOMNode->appendChild() -- Adds new child at the end of the children"
GarethAdams
damn PHPs inconsistent naming conventions
sdwrage
http://us2.php.net/manual/en/function.dom-domnode-appendchild.php
Dangermouse
lol
itrebal
GarethAdams: i say that every day..
aurora
don't we all, itrebal?
itrebal
"was it strip_tags or striptags?"
Stormchaser
$elfdesc = $doc->importNode(elfdesc, true); <-- What is this?
Dangermouse
itrebal: haha i had that like 10 mins ago!
Stormchaser
strip_tags
itrebal
hehe
sdwrage
hold on
aurora
anyway sdwrage is using the php5 dom extension
cenoura
could you please help me on what's wrong with the syntax on this -> http://pastebin.com/540791
Dangermouse
cenoura: What error do you get?
GarethAdams
cenoura: which line gives the error?
line 14 needs a semicolon at the end
sdwrage
http://pastebin.com/540794 <- source
there ya go
cenoura
Dangermouse, something wrong with the brackets after line 7
aurora
sdwrage, suggestion, $elfdesc = $elfdescs->item(0)->nodeValue; could be $elfdesc = $elfdescs->textContent; which is kinda nicer
Dangermouse
$upload_tmp_dir{$file_name} that?
GarethAdams
cenoura: line 14 needs a semicolon at the end
sdwrage
oh ok
cenoura
Dangermouse, GarethAdams, let me run the code as is (because it's the short version on there)
aurora
you were trying to appendChild on a string sdwrage
lig
(Action) watches the Super Bowl
itrebal
(Action) doesnt
cenoura
GarethAdams, oh, it's ok, i forgot to put it there, still the error. but lem me run the code as is in there.
sdwrage
how do I get it to append on an element
?
Dangermouse
cenoura: think you got a parenthesis mismatch on lines 7-8
sdwrage
Im trying to import my element
aurora
on line 12 $elfdesctext = $elfdesc->appendChild($elfdesctext); should be $elfdesctext = $elfdescs->appendChild($elfdesctext);
cenoura
Dangermouse, ok, just a sec pls :)
itrebal
!tell cenoura about error last line
cenoura: the link there will beautify your code, helping you spot some erros quickly (mismatched parenthesis)
aurora
appendChild ads a child within an element, not a sibling, and text nodes can't have children... yet along string types!
gah
sdwrage
I just named it that
« prev 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 next »