![]() |
|||
PHP
IT Tags
magento ecommerce XHTML associative arrays Remove Duplicate sdf Xampp photo gallery objects Mobile site connection to MYSQL local server control panel local server Simplexml Parser ajax my_thread_global_end UPDATE include Solr XML server shutdown Stop Script php mail Combo box Overlapping Layers check domain SimpleXML PHP and FLash multiple file uplo indexing solr mysql server |
Need help with if else
By: rekha singh | 13 Mar 2010 1:15 pm
I could not get the sortby working. I don't know know what I did wrong. Can Someone look at my code and see what went wrong.
CommentsWhat I generally do is check the GET parameter using isset() and then check if the variable is not = "".
By: rekha singh | 13 Mar 2010
It did not work. Here is my code
By: rekha singh | 13 Mar 2010
This line has a bracket missing, should be:
By: rekha singh | 13 Mar 2010
It did not work. Let me post all my codes and take a look what I have done wrong.
By: rekha singh | 13 Mar 2010
* if(isset($_GET[ 'sortby'] ) == ""){*
By: rekha singh | 13 Mar 2010
print_r($_REQUEST) ; (what does this do?)
By: rekha singh | 13 Mar 2010
the $_REQUEST variable is a global variable. if you print it, you will see everything that is going through GET and POST. It will show you what values are in your arrays you pass through get or post. that is all. If $orderby isnt in the request variable, that means it didnt get sent to the script at all, there is probably a problem before that. I would STRONGLY suggest you go and google these things for yourself, thats how everyone else does it. PHP.net has a crap-load of information and you will learn a lot more by reading than you will by asking questions here (especially in the user comments on php.net)
By: rekha singh | 13 Mar 2010
|
