Jump to content

birbal

Members
  • Posts

    2,543
  • Joined

  • Last visited

Everything posted by birbal

  1. birbal

    sessionID

    https://www.google.co.in/search?hl=en&q=where+chrome+stores+cookies
  2. JS interaction happends on events. you have to listen to events and when it occurs you have to act upon them. in this case you have to listen to onclick event on that container and make it slide and do other things. sliding the container could be done in two ways with JS gradually decreas/increasing the height of the container or more efficiently and easily using css3 animation (though it is not supported in older browser.resource:https://developer.mozilla.org/en-US/docs/CSS/Using_CSS_animationshttps://developer.mozilla.org/en-US/docs/DOM/DOM_event_reference
  3. birbal

    sessionID

    session id does not change on every request. if you dont have any session already it will start a new session (when you use session_start) if there is session id passed with each request along with request header (cookies sent with header) it resumes to that session id.
  4. braces are used to set precedence of expressions explicitly here. you can see the precedence of operators here. http://www.php.net/m....precedence.phpthis could be written as if (is_numeric ( $a & $b ) && $a == $b ) as "==" precedence is greater than "&&" $a==$b will be executed first. when you use parens around it you explicitly tell it to execute it. which is in this case is same either way. is_numeric() also will return boolean value so you can ommit the braces around it too. they are used to separate code blocks like in control structure,function declaration, class declaration,namespace declration.http://www.php.net/m...tures.intro.php
  5. if you meant this if (isset ($_POST["testplus"]))first open paren is for if statement and last one for closing it (black braces) and the red one are forisset() function. the rule of thumb is. as many braces you will open you must have to close it. braces may benested inside but all have to be closed.
  6. you have to do it like <script type='text/javascript'>alert("okk");</script> if you have not error reporting enabled make it enabled. it will help you in future to debug"display_error" set to ON"error_reporting" set to E_ALL you can use ini_set() at top most part of your script. http://php.net/ini_Setor in php.ini
  7. why do you think your code is wrong? are you facing any problem or is it showing any error?
  8. this is_numeric ( $a & $b ) and this (is_numeric ( $a) && is_numeric($b ) are not same & is bitwise operator && is logical operator in first case bits will be set where both in $a and $b bits are set. and then the evaluated value will be passed in is_numeric() parameter. if $a or/and $b are string operator will work in characters ascii equivalant, in second case it will check if $a is numeric and also $b is numeric if both are evaluates true it returns true. referencehttp://www.php.net/m....comparison.phphttp://www.php.net/m...ors.bitwise.php
  9. $_GET is case sensitive as all variable identifier is. $_Get and $_GET are different. when you use $_Get['insect_id'] it tries to get element "insect_id" which does not exist. thats what the error means. also you need to put that id in where caluse so it will match the id which you are looking for. you are also just executing the query are not fetching the results.check the examples here http://w3schools.com/php/php_mysql_intro.asp
  10. I don't know how is your image and album scheme had been set in your database. you can have album table and image table seperately. in album table put a colum for coverPhoto which will hold a reference id of image which will store the id of a image. images table will hold the album reference. When you fetch out images by its albums you can choose a particular image id and sumbit the form. when you submit the form you will insert the image id in album's "coverPhoto" column.
  11. if you inherit IoC and change the value of property $db, the value of property $db of inherited class will be resolved, if you use static::$db you can read more about "late static binding" http://in2.php.net/m...ic-bindings.php here
  12. SEO optmisation is about making a semantic page. using meaningfull tags in pages to help bots to recognise tehe contents of the page and index them appropiately.SEO optimisation is simple there is some rule which you have to follow when you build your markup. eg using h1-6 tags to mark a header and emphasis the content type. where as you can use span and give them style using css to display it as h1-6 tags but that wont help in SEO. using appropiate link name (descriptive),using alt attribute to tell what is about the links. etc. . if you have problem in understanding any particular thing you could ask here so we can try to enlighten it. https://www.google.co.in/search?q=google+seo&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-beta check this. there is also a google ebook about SEO there.
  13. I said showing that code you are using to updates the rows, would be helpfull.
  14. you need to store the search query in a persistant storage like database. Rest of the things is just simply quering the database to according to your needs
  15. delete_pictures will be stored as array. so if you want to get delete_pictures array which is list of selected checkbox. you will need to point it likeforeach($_POST['delete_pictures'] as $path){//$path is the value passed with checkboxes which is probably a path of directories//you will validate those paths and remove them}
  16. if there is one statement it does need to put curly braces same as if-else statement. though it is always best to use curly braces for better readability.
  17. birbal

    session start

    this has been answered already in different thread. the rule of thumb is where you will need to work with $_SESSION array you will need to start it. if you need to show the login panel to only the user who are not signed in then you will need to start the session cause you will check the authentication is session. same goes for sighn up page. if you dont want to let any sighned in user enter in sighnup page (show sighn up page only to guest or logout user), you will like to check its authentication and do action depends on that. so it is all depend on how you are going to use it.
  18. you need to pass the id to description page using the url. $strLink = "<a href='descriptionpage.php?insect_id = ". $row['insect_id']. "'>".$strInsect."</a>"; in descriptionpage.php insect_id will be available in $_GET['insect_id'] using that id you can now query your database to find data where it matches the id and you can show it up.
  19. all sites and web applications need to go to your web root ( www in wamp)http://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCMQFjAA&url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F6233572%2Fwhere-is-the-web-server-root-directory-in-wamp&ei=8kBGUObPJaGIiwLpk4Bw&usg=AFQjCNH5ym172uRGA2BKs0JywCoLCX3oxw
  20. It is not issue with mysqli_real_escape_string(). showing us the code which is responsible for update would be helpfull.
  21. you can also use alias. http://w3schools.com/sql/sql_alias.asp
  22. birbal

    Sendmail Help

    you can prepare the list inside the while loop where associated id matches. and outside the loop you can send the mail in fetched email id of that associated user id account.
  23. both of them should return pdostatement object on success. how did you test it? can you post the exact code?
  24. what problem are you facing? what is not working as expected? errors?
  25. your link is not opening. $i = count($arr) -1; $i holds the last index number of $arr array. as index starts from 0 the last index will be total elements in array minus 1. $arr[0] is getting first element of array $arr and use that value as key of array $data which will store the value of $arr[$i]. where $arr[$i] is value of last element of array $arr. it is same as $data[reset($arr)]=end($arr); http://php.net/endhttp://php.net/reset
×
×
  • Create New...