![]() |
|||
PHP
IT Tags
photo gallery indexing solr Overlapping Layers Mobile site php mail Combo box Remove Duplicate Xampp my_thread_global_end Stop Script SimpleXML control panel PHP and FLash multiple file uplo local server connection to MYSQL local server magento ecommerce objects XHTML associative arrays server shutdown Simplexml Parser check domain ajax mysql server UPDATE Solr XML include sdf |
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
|
