Re: 2 questions: Search in array and detect JS

From: Date: Fri, 14 Apr 2006 19:07:24 +0000
Subject: Re: 2 questions: Search in array and detect JS
Groups: php.general 
Request: Send a blank email to php-general+get-234014@lists.php.net to get a copy of this message
Hey Tedd / Robert, Thanks for replying. ---------------------- Tedd: However, I read where one can detect if a user has cookies on by sending a cookie and then reading it back. And considering that you can send a cookie via js, you could do that. However, that would mean that the user had to have both js and cookies on.--------------------- Yep, two things to worry about instead of one. ---------------------------- Tedd: Second question. Unless I don't understand the problem, simply use a loop and stristr().---------------------stristr() is a bit expensive, was not too sure if I wanted to use that because I will be lookingin a array of hundreds of movies (maybe even thousands)---------------------- Robert:It is probably a better to approach this backwards. So load the non JS page, and within it detect if javascript is enabled, in which case perform a javascript based redirect to the Ajax enabled page.---------------------Hmmm, makes sense and I have not used this method before....will def check it out.---------------------- stripos() is a better candidate since you are only looking for the string and it skips the extra processing of stristr().----------------------I am more familier with strstr and stristr but will give stripos a look-see too..Thanks,Ryan

« previous php.general (#234014) next »