PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Jul 21, 2012 05:27
create a new array in every loop. I asked a question: stackoverflow.com/questions/11589685/…
Jul 21, 2012 05:26
Sorry I don't understand
Jul 21, 2012 05:26
@cHao Heh?
Jul 21, 2012 05:23
Say for example a db table has x amount of fields, I want to run that same x amount of loops and in each loop I want to create a new array. Say x = 3 then I want to end up with array1[], array2[] and array3[]. How would I go about something like that if it's possible?
Jun 30, 2012 19:02
Cheers guys chat again soon!
Jun 30, 2012 18:58
@tereško Ok and if I set session autostart in php.conf I'm assuming it just removes the need for me to call session_start()?
Jun 30, 2012 18:45
Hi people, quick question, I have a if statement that checks for a php session variable, If it is not found it starts a session and assigns the variable. Now every time I refresh the page the session variable is not set. So I have to put session_start() before running the if statement in order for this to work. So every time the page is refreshed it runs the session_start(). Is that right? I thought session_start() should only get called once and stay active even when the page is refreshed?
Jun 24, 2012 18:19
@webarto That would only work on the accessed php file, I need any url on my domain to redirect to index.php parsing the original url request
Jun 24, 2012 18:11
@webarto I mean finding out what the requested url is, how would I that?
Jun 24, 2012 18:04
@Truth Sorry but I don't quite understand. And is it only the web server that has to intercept the url?
Jun 24, 2012 17:59
@webarto @Truth So how would you go about setting up such a router/request systems? Anything I could google?
Jun 24, 2012 17:56
So how would you go about setting up such a router/request systems? Anything I could google?
Jun 24, 2012 17:53
So you basically need to intercept the url's and provide a page or a 404 page if the url does not exist. @webarto You say php already has something like that?
Jun 24, 2012 17:43
Hi guys, on Joomla! when you turn on the SEF URL option, it will rewrite certian URL's. but when you access that url through your browser, it doesn't exist yet somehow the primary index.php file still intercepts it, I'm assuming it's apache that does that, how could I do something like that? anyone here did something like that before?
Jun 22, 2012 14:46
chat later
Jun 22, 2012 14:46
@Leigh ok cool, thanx.
Jun 22, 2012 14:44
@Arkh no I md5 it, I have not worked with authentication systems much yet
Jun 22, 2012 14:40
@Blizz That's how I though it'd be practical
Jun 22, 2012 14:39
@Leigh This is where I read that: stackoverflow.com/questions/7214458/…
Jun 22, 2012 14:37
I want to store user data in a cookie so the user can be 'remembered' on the next visit. I've read that most people hash the user id and password and store it in the cookie, but how do you authenticate the cookie? The only way I can think that'll work is if you extract the cookie value, then hash EVERY user id and password and compare it to the cookie value until you find a match, but it seems unpractical. How would one normally do this?
Jun 22, 2012 14:33
Hi phpl
Jun 22, 2012 07:39
@AnujJain Of-course... Lol, thanx
Jun 22, 2012 07:35
@AnujJain Ahhh I see, thanx, so it's basically a mini if statement
Jun 22, 2012 07:31
Hi, I have been looking at some php code and came across a statement I don't understand, can someone explain this to me please:
p1 ? p2 -> p3 : p4;
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
May 24, 2012 18:16
Hahaha, aaahhh I just cant get it to work in IE. Maybe I should create a function that tells ie users: "Sorry IE not supported"
May 24, 2012 18:14
@rlemon If I hit enter it just wraps it in another h1 tag
May 24, 2012 18:01
@rlemon If I want to remove the h1 tag again, I'll have to search for it right? If there are multiple h1 tags it's a problem
May 24, 2012 17:56
@rlemon If I want to remove the tag againg it;s going to be impossible
May 24, 2012 17:54
Hahahaha, oh ok, please can you show me how to do it then?
May 24, 2012 17:53
@Esailija :( Noooooo.... I want to build my own as a project, otherwise I would've settled for tinymce or ckeditor. Is there really no way to do that in ie?
May 24, 2012 17:50
@Esailija So is there no other way to do this in ie? I don't want to wrap the contents in a h1 element coz it's difficult to then remove it again
May 24, 2012 17:45
yeah, document.execCommand
May 24, 2012 17:43
Hi guys, I want to turn selected text into h1, I do it with execcommand('heading',false,'h1') and it works fine in chrome and ff, but not in ie9... Does anyone know how to do this in ie9?