| |
| |
| |
|
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
Comments:
<0> Be back in 2 hours exact or we can't help you. <1> ...... <0> Would you like to be on the 4 hour queue? <0> You can reserve spots in the queue if you'd like. <1> I reserve spot #1 <0> RobertM: Sorry, you're already #1 on the 2 hour queue <1> =\ <2> i know there is a built in variable to work with and display server time but is there one for user's data/time ? <3> kraypius: users date time is client side IIRC <3> so javascript <2> yeah.. thought i would have to use js. just thought since php could get other user info it could get time <0> kraypius: lig is correct, a user's time is client-side. Thus why they are a "user", because they're a client. <0> kraypius: #web should be of help for the appropriate JS. <2> thnx
<4> ***uming that $Lead->contacts is a mysql resource is there any frickin reason why this wouldnt work? $out['total'] = (mysql_num_rows($Lead->contacts)) ? mysql_num_rows($Lead->contacts) : 1; ? <0> lith: No, not much reason it won't work. <4> kuja: thats disturbing :/ <0> var_dump($Lead->contacts) <0> Though, it needs to be a result resource. Not a connection resource. <4> kuja: I'm iterating through that same resource 2 lines down and its working fine <4> kuja: i'm doing something else wrong,... just making sure that i wasnt going insane <1> I have a site and I want it to auto go to index.php?topic=home insted of just index.php? , how can i do that? <0> RobertM: Think about it. There's no need to redirect. Just make topic=home the default. How are you using it? <0> Is it like a switch? <1> http://drunkencoders.com/robm/ <0> switch ($_GET['topic']) { case 'home' ... something like that? <0> RobertM: I'm talking about the code. Are you using a switch statement to determine which page is to be displayed? <1> no <0> Then? <1> I just want it to redirect to index.php?topic=home when no topic or an incorrect topic is typed in <0> .. <4> even better thean a switch $topic = (!$_GET['topic']) ? 'home' : $_GET['topic']; <0> That was not my question, RobertM. <0> More clean: $topic = isset($_GET['topic']) && <is valid check> ? $_GET['topic'] : 'home'; <5> hey kuja. got time for a quick array prob? <0> Mapionetka: Maybe <0> Just ask. <5> ive asked 3 times and been ignored <5> Code: http://pastebin.com/545950 <5> Output: http://pastebin.com/545953 <3> explaination of problem? <1> kuja: Does not work <5> print_r produces expected output <5> echo produces 'A' or 'r' <5> depending how you reference the array element <0> RobertM: Of course not. How can I write compatible code that'll work for you without knowing how *your* code does it? Think about it, then give me my answer. <6> does the mail() function work by firing off the sendmail command? <1> oh, yeah... :( <0> Mapionetka: I don't get it. <7> hi to get the last elemnt in an array? <5> when i use print_r, the array is as expected. if i just use echo array['key']; it echo's 'A' <8> i'm ***y: http://slapdot.com/ <0> Mapionetka: Dude, print_r() doesn't return an array. <5> i know <0> print_r() returns a dump of the array, if you provide it with the second argument of true. <5> it prints it in human readable form <0> You can't reference a dump. <5> oh **** <0> It's just a mere string. <5> i cant believe i overlooked that <8> "mere" <0> Heh <5> i realise what i did now, i forgot to remove that from previous messing around <8> now_playing[Smashing Punkins - Bullet With Butterfly Wings] length[4:17] <0> cess: Don't do that again. <8> word <0> Next time will most definitely be a ban. <8> i help people, no? <8> fine, ill leave <0> It's no excuse. <9> what function can cut a string off to a certain number of words? <1> kuja: <?php include("include" . $_GET['topic'] . ".html"); ?> <1> thats all I am using
<10> that is not a good idea... <0> It's insecure. <11> you can use ereg_replace to clean it <1> kuja: It's not ment to be secure <9> Anybody? SOmething like wordwrap but it cuts it off to a certain number of words... <9> Grr...c'mon <11> if anyone else can view the webpage, they could exploit it <9> Instead of just putting a br tag in it <10> htns: building a function that does that can't be too hard... <3> htns:http://www.php.net/manual/en/ref.strings.php <0> RobertM: If you have no care for security, then just add before your include: $_GET['topic'] = isset($_GET['topic']) && file_exists("include{$_GET['topic']}.html") ? $_GET['topic'] : 'home'; <3> htns: http://www.php.net/manual/en/ref.strings.php <0> htns: Use wordwrap()'s output and explode it. Then just get the first element of explode;. <9> jonnay: I'm sure there's a function that can do that. <10> htns: i'm sure google could help you find it.. :P <3> htns: of course there is - look at the manual and find it <1> thanks <9> lig: Yeah, I am and just did. Why else would I risk my life to ask a question in #php? <12> htns: preg_replace can do it, if nothing else can. But I'm sure that explode, array_slice, and implode can also do it. <0> htns: Use your head. The total functions you'll basically need to make something nearly failproof is md5(), uniqid(), wordwrap() and explode(). <3> htns: we have all had it happen - <9> Yeah, but I was asking whether a function existed that can do that. Geez. <1> kuja: Do I really need any security? There is nothing that is worth anything on that page <10> RobertM: How about that server? <0> RobertM: I'm curious. Is that a Windows or Linux server? <1> kuja: No idea. Someone over at that site gave me space. I am writing homebrew stuff for the DS <10> i'm not 100% positive on this, but I think that someone could run a remote script from your script. <1> =\ <0> Not with his current setup. <1> so <1> Is there any need for security, do you think? <1> for me at least <0> He's got both prepending and appending strings for his filenames. <13> is there a function that exists which compares n number of varibles and outputs str according to which varibles has the hightest integer value? <14> i'm guessing that at least some of you guys(and girls) are computer science majors? <4> brianJP: yes and were not helping you with your homework ;) <14> i don't need any help <4> then were not doing your homework :/ <14> i don't have any homework <14> just ahd a question :) <14> had <4> ah shoot then <13> anybody? <14> the reason i ask is...can cs majors have a portfolio? <14> ...when looking for a job for the first time? <4> brianJP: Projects completed protfolio? Financial portfolio? <14> first one <4> brianJP: Of course <3> brianJP: doesn't hurt <14> people wont thiink thats weird? <4> Zend: are they all ints? <13> yes <3> brianJP: if they ask for it give it... most ask for some code snippets and what not.. <4> Zend: Not that i know of. <14> i was thinking that i might put at the bottom of my resume "for a portfolio of sample work see http://url..." <13> ohh... gay... i'd have to do something like if($i1 > $i2) if($i2 > $i1), or something like that? <14> or something like that <3> that is fine - but hard copies should also be on hand at an interview.. <4> Zend: Or throw them into an array while iterating through, sort and pull the last key <14> ok cool, thanks lig <13> ok thanks <15> Notice: Use of undefined constant id - ***umed 'id' in f:\unemat\site\sistemaunemat\cadastro.php on line 5 <15> How solve it ??? <0> You're probably doing something like $foo[id] <0> It needs to be $foo['id'] <15> $id=$_POST[id]; <0> Make it 'id' <0> It's a string, not a constant. <15> $id='id'; ??? <15> the $id will get the content of id variable <15> from a form <15> is that correct?? <0> ...
Return to
#php or Go to some related
logs:
Please make sure the package you used to installyum was built for your install o Muonline blast vault sleep in javascript #web pychecker classmethods eithelonnen gimp convert rgb565 bitmap ubuntu multiple nics force Xen + Fedora64 #perl
|
|