@# 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



Comments:

<0> aidan: Would an xpath query work then? Something like $xpath->query( ".=/*", $node )
<1> I don't know if I'll be able to have access to the php.ini file. It's a on a big company hosting.
<2> maybe, caramba
<3> isleshocky77: Yes, we call it the auto_prepend file.
<1> mattmcc: Yes but normally when using hosting services you don't have access to the php.ini file. So you can set it through an .htaccess file.
<1> But when php is runnning as a cgi instead of a module apparently you can modify it through .htaccess files.
<4> I suspect the simplest and quickest (though not necessarily cleanest) way to solve this problem is a small perl script :-)
<1> Theory: please explain.
<4> isleshocky77: write a quite script that writes the relevant require() line to the top of all your scripts
<5> lsailor: look at preparing queries so you can just feed your query an array
<1> And when I get new files??
<1> That won't work.
<4> isleshocky77: you create them using a template :-)
<4> alternatively, you make it part of your upload process
<6> can anyone help me, as to why the if() in the following code doesnt work? http://phpfi.com/102811
<7> DepretioN: I have 10 text boxes can I just give them all the same name and they will be stored in an array?



<2> Vyker: haven't we discussed this?
<6> aidan, we might have done, but for the foreach loop, this time im after why the if() doesnt work :)
<2> you haven't changed your for / foreach loop
<6> aidan, i havent, i tried for about 6hours yesterday, i got nowhere! so i went back to it
<2> .. there's only 1 change to make
<2> instead of checkbox1[]
<2> checkbox[1][]
<2> then, foreach ($_POST['checkbox'] as $foo) instead of your for() loop
<6> im sure ive tried that, but ill give it another go, as you made it sound so easy now!
<2> I made it sound easy last week
<2> as to why your if doesn't work, var_dump($value)
<6> aidan, i jsut added that if() for some sort of validation, but i see what you mean, with realtion to my crazy for and foreach mess.
<7> can a text box be used like a checkbox and name them visitor[] and they will be stored in an array?
<6> aidan, ill put a halt to progress on validation, and ill get back to the for mess. thanks.
<2> lsailor: yes
<7> ty
<2> man my new box is cool, updatedb takes like half a second
<2> # time updatedb
<2> real 0m0.162s
<8> hi
<5> try that again next week :P
<9> aidan: Whatcha got under the hood?
<6> aidan so how do i take the number in the []'s as use it in an echo? i.e checkbox[1][], i want the number 1, and use in "echo 'this is question numner 1';" ?
<2> one of those new amd 64 3ghz, gb of ram, 500 fsb
<2> Vyker: you foreach it
<5> foreach ($checkbox as $key => $value) echo $key;
<10> i have a physics formulae....how would i use the gdlibrary and PHP language to solve a physics problem and draw the graphs?
<6> where $key is the number and $vlaue is the string, i see
<11> aidan: updatedb is more reliant on the speed of your drive rather than the speed of your CPU
<5> and how often u run it :P
<11> aidan: still, must be a fast drive ;)
<11> SATA?
<5> Fushuing: PHP Image functions and your physics text book?
<10> i just don't know how to write the formulae so PHP understands it :/
<10> and this is still simple stuff >.<
<11> Fushuing: you really don't want to write your own graphing routines. i'd suggest looking in to jpgraph or similar
<2> caffinated: yeh, they're SATA and expensive but I didn't get the specs :/
<6> aidan, how is this? http://phpfi.com/102812
<10> caffinated: i am doing this to actually DO it
<10> so i have some experience with this
<11> Fushuing: better haul out your geometry textbook then too
<9> Is anyone here knowedgable about both PHP and JSP?
<2> Vyker: is $value an array?
<10> there is nothing to learn about geometry :S
<12> Fushuing: Solve for one variable in terms of the other, and plot X versus F(X).
<11> Fushuing: then you should have no problems at all plotting graphs!
<10> at least, i've only had basic geometry
<6> aidan, yes i beleive so.
<10> it's a double-quadrated graph (Did I say that correctly in english?)
<12> Not all that much geometry involved in graphing, it's just coordinates and lines, and occasionally curves.
<2> Vyker: print_r() it so I can see what is in it
<5> Fushuing: We cant help with your formulae unless you tell us where you are getting stuck.
<6> shall i paste it here, as its only one line?
<10> DepretioN: i don't know where to BEGIN :/
<10> graphing would be easy as i could set at which "x" it will calculate the y axis
<6> aidan, http://phpfi.com/102813 this is what it looks like while its still checkbox1[].
<11> FlamingCows: plotting a curve is a geometric function.
<11> and if you've never actually done it in code, it's not trivial.
<10> and thus make automaticly a curve based on how illiterate i want it (Did i used the word correctly?)
<6> aidan, i think i best change the checkbox setup first, then run print_r() again ?



<2> Vyker: do you want to show all the options or only the one they didn't check?
<2> yeh, change the boxes then run print_r again
<10> but anyhow, i will check on jpgraph if it shall help any
<11> Fushuing: if you want to do your own graphing library, it probably won't help you at all.
<12> caffinated: As long as you have an equation, it's trivial enough. You have X (or an interval), you let PHP calculate f(x), and you stick in a dot.
<10> FlamingCows: that's what i was thinking of first
<11> FlamingCows: have you seen what you need to do to plot a circle using dots?
<10> lots of calculating...
<12> caffinated: Lots of automated line slope calculating, is my guess, for the step lines.
<10> so i can basicly draw a cube with four lines and call it a circle...
<10> *shrugs*
<6> aidan, here it is, my checkboxes and radio boxes are question[1][], print_r looks like this http://phpfi.com/102816
<12> Once you get to a low enough delta-x for step line length, you get the visual effect of seeing a curve.
<11> ok then, knock yourself out
<5> I cant believe you guys are actually having a discussion about this, Fushuing, good place to start... read up on what php's image functions are capable of, and get your formulae giving the correct values. (We cant help with that unless you tell us whats going wrong and where)
<12> caffinated: If I'm wrong, correct me. :\
<10> DepretioN: getting those basics down ;s
<6> aidan, i think this is easier to read http://phpfi.com/102817
<10> might seem obvious to you, but not to me
<2> Vyker: okay cool, then foreach ($value as $checked) { echo $checked; } inside the first foreach
<11> I did do something that does basic primitives in javascript: http://ben.nullcreations.net/newdraw/
<11> got sidetracked before I went in to arcs and ellipses though
<10> anyhow, i will try my luck with jpgraph before i start asking crap again ;)
<6> aidan, here we go, i hope i got this right, http://phpfi.com/102818
<6> aidan i think, im not sure, but shouldnt i get rid of $key => ?
<6> i think this is right now, http://phpfi.com/102820
<13> o_O
<2> Vyker: you only want the result in the inner for loop, and the question in the outer for loop
<6> aidan i see.
<2> caffinated: the fact there's only 500mb of data on the box may have something to do with it also :/
<6> this must be it now, http://phpfi.com/102821
<0> aidan: I discovered DOMNode->isSameNode(), so I can run while(!$node->isSameNode($doc->documentElement)) $node = $node->parentNode;
<0> :)
<2> ah how cool
<2> I don't recall seeing that in the spec
<0> maybe it's not in xpath but it's here anyway http://se.php.net/dom_domnode_issamenode
<0> why did i say xpath?
<0> i mean DOM
<6> aidan, thank you, it worked :) , now back to validation :)
<2> Vyker :)
<7> do i have to set something for the value or the text box? or should this work? <input type=text name=VisitorName[]>
<6> aidan, i must have had, had somthing very wrong yesterday.
<7> is is still inserting a new row for each box
<14> hello
<14> if i turn off globals how can i still access variables like $SCRIPT_NAME
<15> any recommendations on some published php books?
<14> turn off register_globals, that is
<2> lsailor: you should have quotes around it
<16> what command is used to repeat data, for example when making a forum it repeats for every post (with a little bit more coding)
<14> sysfault: i like "Programming PHP" by Rasmus Lerdorf & Kevin Tatroe on O'Reilly's
<7> aidan: thanks, i will try that
<6> aidan, could you possible check my if() statement here, im yet to check it, but wanted to know if you could see anything wrong with it, have i gone one statement too far ;) http://phpfi.com/102822
<5> have you done a var_dump($value) yet?
<2> Vyker: checked will never be empty
<2> Vyker: you want to do a count($value) === 0 before the inner loop
<6> as the condition of an if() ?
<2> yep
<6> here it is, http://phpfi.com/102823
<2> good
<17> hey all http://pastebin.com/560500 any help would be awesome .. trying to compare a $char = fgetc($fd) with a $string[$position]
<17> it matches when $char and $string[$position] are '-' but not when they are both 'B'
<18> how can I do exec() and store each lined returned into an array?
<2> Renacor: read all the functions, exec/p***thru/system, one of them will do what you want
<18> heh tried them all
<17> exec("program name",$array); print_r($array);
<4> dtb: your code is at least potentially buggy :-)
<17> i write it in pastebin lol
<17> u should see the real stuf .. its a shocker
<6> aidan, it didnt work :( i purposly didnt answer question1, but it still all went through.
<17> what im trying to do is extract the binary data between two boundary strings from a file stream
<17> any better ways ??


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#linux
root passsword+ubuntu
kthinkbat howto
diffrence between where clause and having clause
#gentoo
#kde
#css
#debian
verliog structure
#gentoo



Home  |  disclaimer  |  contact  |  submit quotes