logs archiveIRC Archive / Freenode / #php / 2006 / February / 10 / 1
lig
(Action) laughs over Stormchaser previous link
b1n0ry
Pollita: yeah, i don't even need a woman for those anymore
itrebal
Jymmm: i heard that class doesn't work on most systems
Pollita
(__)
(oo)
/------\/
/ | ||
* /\---/\
~~ ~~
Jymmm
itrebal do you know why?
Pollita
...."Have you mooed today?"...
itrebal
Jymmm: nope
stevo_inco
prophile, htmlHeader is defined in an included file at the top of the script... likewise, "print htmlFooter;" works for some reason :-/
prophile
stevo_inco, check if it's defined with php.net/defined before you output it and then tell me that's not the problem :P
         

stevo_inco
Will constants work from included files? Or is there some rule that wont allow constants to work outside of their .php file...
Jymmm
(Action) has no idea what you're talking about, so here's a picture of a bunny with a pancake on its head:
___
(\_/)
(^_^)
(")(")
prophile
constants work once they're defined
but it's probably not defined
for whatever reason
check with defined() before you output it
Jymmm
itrebal ironic that it works on his site, but nobody elses.
itrebal
Jymmm: indeed, hehe, he's running a different version, of course
Stormchaser
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=134156 <-- heh heh heh :)
stevo_inco
prophile, I added the check into the code, and then it started working, but the code I added to check it never outputted anything.
How odd.
prophile
*shrug*
lsailor
crap..two phone calls and now the code i need is lost in the scroll
Julian|Work
grep
itrebal
grr... my script is borked.
peritus
"else if" vs "elseif"? comments?
itrebal
i use elseif but if you come from C else if is probably easier to get used to
Stormchaser
peritus: no difference.
peritus
why introduce "elseif" at all, when else if does exactly the same?
Stormchaser
BAh... MPlayer 's CVS is badly borked... The seek position is broken.
myconid
if I have $f = 'name'
can I do this:
if(isset($inputfields[$$f])) $this->$$f = $fields[$$f];
in a class object.
and have $this->name set to the fields array's 'name' value?
itrebal
myconid: you shouldn't use variable variables
Stormchaser
that would be logically incorrect
Erm.
myconid
sorry..
if isset $fields
         

Stormchaser
myconid: Have you tried it?
myconid: Why are you persisting on (ab) using variable variables?
!+var vars
php-bot
var vars is http://php.net/manual/en/language.variables.variable.php, but by using that you probably have an error in your logic... You should use arrays instead (http://php.net/array)
itrebal
(Action) recalls someone's comment about CVS and "The Latest and Greatest"
myconid
Stormchaser: ?
Stormchaser
itrebal: Maybe 5 years ago... now it's overdriven with subversion
itrebal
Stormchaser: i was referring to how the latest and greatest is allways from CVS :)
Stormchaser
lol
cisse
yay svn
myconid
http://pastebin.com/547388
Hal9002
hello!
is there something which is the opposite of htmlspecialchars? i want & to become &, for example
Jymmm
itrebal: FYI... http://www.ocr-research.org.ua/list.html ~~~~~
Stormchaser
Hal9002: html_entity_decode
itrebal
Jymmm: i'm going through it now, thats interesting
Hal9002
Stormchaser: thank you
Stormchaser
myconid: What do you gain with this: $this->$$f = $inputfields["$f"];?
tuxtheslacker
hello.
I'm using ldap with php, and I'm getting resource id #2 as the error.
where could I find out what that means?
Stormchaser
resource id can't be the error...
itrebal
Jymmm: so... what *is* a good captcha?
tuxtheslacker
Stormchaser what is it then?
Jymmm
itrebal look at the ocr demo and the teabag thing
itrebal
Jymmm: ok
Stormchaser
tuxtheslacker: a *resource*... A valid connection handler.
tuxtheslacker
okay, so that means the connection is good?
Stormchaser
yes
tuxtheslacker
or ??
oh okay.
cube
is there a way for PHP to read the value of a disabled form field? ie. [HTML] <input type="text" name="name" value="cube" disabled> ... "cube" does not appear in $_REQUEST['name'] upon submit..
Stormchaser
the key figure is *disabled* here...
gezick
can i return a reference to a variable?
Stormchaser
gelignite: try it.
cube
would I need to use javascript to re-enable the form field on submit so it'd be posted to PHP's $_REQUEST?
tuxtheslacker
hmm, stormchaser, do you think you could take a look at this and tell my why it breaks?
Stormchaser
cube: You might want to use the readonly flag in the input name.
tuxtheslacker
I've never used ldap before, and I need to get onto our schools for this.
Stormchaser
Tux_Paranoid: Sorry -- Never delt with ldap
Er... tuxtheslacker
tuxtheslacker
is there anyone in here that could help me out in dealing with the ldap?
cube
Stormchaser, what's the readonly flag?
tuxtheslacker
pastebin.com/547426
Stormchaser
s/flag/property
tuxtheslacker
http://pastebin.com/547426
that's better.
cube
Stormchaser, don't quite understand. is it part of a html form field ?
Stormchaser
cube: yes.
cube
Stormchaser, as far as I knew.. the r/o flag is "disabled"
tuxtheslacker
Stormchaser: do you think you could chekc that out and see if there's something wrong with the syntax?
cube
but then it seems that PHP doesn't pickup the field.. as if it was never submitted
gary
is there an easy way or an easy function to do something just once in a loop?
Stormchaser
no it isn't... Disabled is disabled, readonly is readonly
cube
ahh groovy
Stormchaser
cube: Anything maarked as *disabled* is not posted to the request, so it doesn't exist.
lechunk
gary: set a variable=1 before the loop and blank it after you've done what you want to do only once. Then make the action conditional.
gary
cool, so there is no built infunction, just a simple flag :D Thank you!
Stormchaser
while(true) { /*your stuff here */ }
gary: If you want the function to exit the loop after first call, use return
Marskuh
Hi
cube
Stormchaser, too bad I can't read only checkboxes & selects ;(
Marskuh
i got a mysql_error with No error-nr... :(
what should i do?
i dont get the error :(
bobbuilder
how would i replace all links on a page with a common target string
Stormchaser
cube: Mngh... ALL the data, that you send to user can be tampered with... So even with those 'readonly's and 'disabled, one can easily modifies a form and screw up your dats.
bobbuilder
if i have the source in a variable
Stormchaser
Marskuh: Mysql error 0 is _NO ERROR_.
bobbuilder
i need to do..<a href="****"> with a regex or something
gary
Do you think this looks quite smart and clean?
http://www.garyhooks.co.uk/index.php?page=projects
I am making a personal website, but also for the use of potential employers to view so I want examples of my work to be on it
Julian|Work
gary, #web
jonnay
gary: nto sure about the aliasing on the title.
Julian|Work
I'd recommend using another font.
Marskuh
stormchaser: but wth is it... the connid is correct... but the query_result isnt valid
Julian|Work
Even if you meant to use TNR, it looks like the default, heh.
Stormchaser
preg_replace ('#<a href="(.*?)"#','<whatyouwanthere>', $string); (or something)
Marskuh
Stormchaser: i got an empty query_result but the query is correct.
tuxtheslacker
hey, can someone give me the syntax of searching an ldap db?
Stormchaser
Marskuh: Well... Then you're passing the wrong variable to the query...
Marskuh
Nope
Stormchaser
Er... wrong or empty, that is)
Marskuh
the query is correct
Stormchaser
Marskuh: Pastebin the code.
gary
jonnay: you mean the way it says "Passion Records" rather than www.passion.... or whatever?
Marskuh
Stormchaser: http://pastebin.com/547465
jonnay
gary: actually, i was referring to the "garyhooks.co.uk" title. The aliasing that happens because of the interlaced background.
gary
oh I see.
jonnay: I used gimp to create it, and graphics is my worst worst area really, where as development is my best. I'm not sure how to get rid of the jaggyness. It is anti-aliased, not sure what interlaced background is? You mean stripey?
sorry for my lack of knowledge
itrebal
whats the function to get an images mimetype?
cvncpu
itrebal: so you can tell what kinda image it is?
itrebal: oh oh sorry
misread
thought you asked what they were for
rzei
how did i initialize an empty table? $table = []; is an syntax erro
itrebal
cvncpu: i understand :)
or in generall, and what a files mimetype is?
cvncpu
rzei: I didn't know you had to initialize vars in PHP
nathe
you don't have to, it's a good idea
mattmcc
You don't, strictly speaking. It's sometimes prudent to do so, however.
« 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 next »