My website has a page (named "Private") where a user can login with his username and password. The problem is that when a user is logged in and the page is refreshed (or the user switches to another page and then goes back to the "Private" page), the session seems to have expired and the user needs to login again. I'd like to make it so the session doesn't expire for 30 minutes. How would I do that?
I need to keep a session alive for 30 minutes and then destroy it.
Here is the script to create my tables:   CREATE TABLE clients (    client_i INT(11),    PRIMARY KEY (client_id) ); CREATE TABLE projects (    project_id INT(11) UNSIGNED,    client_id INT(11) UNSIGNED,    PRIMARY KEY (project_id) ); CREATE TABLE posts (    post_id INT(11) UNSIGNED,    project_id INT(11) UNSIGNED,    PRIMARY KEY (post_id) );   In my PHP code, when deleting a client, I want to delete all projects posts:  DELETE  FROM posts INNER JOIN projects ON projects.project_id = posts.project_id WHERE projects.client_id = :client_id;   The posts table does not have a foreign key client_id, only project_id. I want to delete the posts in projects that have the passed client_id.  This is not working right now because no posts are deleted. Getting absolute path of a file How can I wrap text around a bottom-right div? Show that every prime $p>3$ is either of the form $6n+1$ or of the form $6n+5$ What does eno mean in network interface name 'eno16777736' for CentOS 7 or RHEL 7? Under consistent network device naming scheme, what does 'eno' stand for in network interface name eno16777736 for CentOS 7 or RHEL 7? How to prove that if $\lim_{n \rightarrow \infty}a_n=A$, then $\lim_{n \rightarrow \infty}\frac{a_1+...+a_n}{n}=A$ I'm wondering if I have a sufficient proof of the following:   If $(a_n)$ is a sequence such that $\lim_{n \rightarrow \infty}a_n=A$, then $\lim_{n \rightarrow \infty}\frac{a_1+...+a_n}{n}=A$.   My approach:  For all $\varepsilon &gt; 0$, there exists $N$ such that for all $k&gt;N$, $|a_k -A|&lt;\varepsilon$. So we can break the limit up as follows $$\lim_{n\rightarrow \infty} \frac{a_1+...+a_k}{n} + \lim_{n \rightarrow \infty}\frac{a_{k+1}+...+a_n}{n} \overset{\epsilon \rightarrow 0}{=} 0 + \lim_{n \rightarrow \infty}\frac{nA}{n}=A$$  Is this on the right track, or am I missing something about breaking up the limit in the way I have? I really love Eclipse (PDT)... But i'm developing sites using HTML5 and CSS3 and it mark the HTML5 tags like &lt;nav&gt;, &lt;section&gt; and &lt;article&gt;  as invalid tags (inexistent).  How can I add those new tags to it?  And what about CSS3 rules?  I read something about remove the "invalid tag" check... and that's not what I want. :( Is Feyerabend confusing discovery and justification when he criticizes the scientific method? I am reading Feyerabend's "Against Method", where he uses Copernicus's (and Galileo's confirmation) discovery of the fact that the Earth orbits around the Sun and other examples to show that irrational approaches can lead to legitimate scientific progress. He then claims that no unified epistemic principle or principles can be used to define science, and that science is best characterized by anarchy.   Is he confusing the way scientific truth is discovered with the way scientific truth is epistemically justified?   Even if it is true that Copernicus, Galileo and others used irrational methods to arrive at valid scientific discoveries, why does that affect science's special epistemic status compared to other fields of inquiry? I can't retrieve my Facebook password I haven't been to my Facebook account in a while and I can't remember my password. When I try to have it reset, it goes to a security question, but I can't remember that either.    Is there anything I can do? What is wrong with using inline functions? While it would be very convenient to use inline functions at some situations,  Are there any drawbacks with inline functions?  Conclusion:  Apparently, There is nothing wrong with using inline functions.  But it is worth noting the following points!   Overuse of inlining can actually make programs slower. Depending on a function's size, inlining it can cause the code size to increase or decrease. Inlining a very small accessor function will usually decrease code size while inlining a very large function can dramatically increase code size. On modern processors smaller code usually runs faster due to better use of the instruction cache.  The speed benefits of inline functions tend to diminish as the function grows in size. At some point the overhead of the function call becomes small compared to the execution of the function body, and the benefit is lost  There are few situations where an inline function may not work:   For a function returning values; if a return statement exists. For a function not returning any values; if a loop, switch or goto statement exists.  If a function is recursive.   The __inline keyword causes a function to be inlined only if you specify the optimize option. If optimize is specified, whether or not __inline is honored depends on the setting of the inline optimizer option. By default, the inline option is in effect whenever the optimizer is run. If you specify optimize , you must also specify the noinline option if you want the __inline keyword to be ignored. How was Loki not crushed by Mjolnir? In the Thor movie, Thor puts Mjolnir  on top of Loki at the end of the movie to stop him from moving.  Why did this not crush Loki?  And if it did not crush him, why could he not just roll out from under it? I want to run a command line that opens a new chrome window with another profile. I tested the following commands: Preconditions:  I have two profiles: Profile 1 and Profile 2  Chrome is already running with Profile 1   open -a &quot;Google Chrome.app&quot; --args --profile-directory=&quot;Profile 2&quot; The above command does nothing other than bringing focus to the currently running chrome with Profile 1 I also tried: open -a &quot;Google Chrome.app&quot; --args --profile-directory=&quot;Profile 2&quot; --new-window The effect is the same. I want to run a command line that opens a new chrome window with Profile 2 while there is already a Chrome window running with Profile 1 How to check type of files without extensions in python? The advantages and disadvantages of using Kaiser Rule to select the number of principal components Is the Kaiser rule (choosing only PCs with eigenvalues >1, ) a reasonable method to select the number of principal components to retain? What are its pros and cons? Two particles with initial positions and velocities $r_1,v_1$ and $r_2,v_2$ are interacting by the inverse square law (with G=1), so that  $$ {d^2r_1\over dt^2} = - { m_2(r_1-r_2)\over |r_1-r_2|^3} $$ $$ {d^2r_2\over dt^2} = - { m_1(r_2-r_1)\over |r_1-r_2|^3} $$  (the inverse square law along the line of separation). What is the complete solution of these differential equations? What is the position of the two objects as a function of time?  After reading a lot on Wikipedia, I've come to the definition of center of mass and relative coordinates:   $$R(t) ~=~ \frac{m_1 r_1 + m_2 r_2}{m_1+m_2}$$  $$\ddot{r}(t) r(t)^2 ~=~ (m_1+m_2)G$$  Where $R$ is the center of mass, and $r$ is the displacement between the particles... Is this correct? How do I proceed to solve the differential equation? Why does parameter expansion with spaces without quotes work inside double brackets "[[" but not inside single brackets "["? addtocontents not working with certain other packages The error I am having when trying to update my package list.  W: GPG error: http://download.opensuse.org ./ Release: The following signatures were invalid: KEYEXPIRED 1436387333  W: Failed to fetch http://ppa.launchpad.net/samrog131/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found  E: Some index files failed to download. They have been ignored, or old ones used instead. Nick Fury told Captain America that he has been "asleep" for nearly 70 years. If Dominic Cooper was playing Howard Stark Senior (grandfather of Tony Stark) then it is fine, but if he was playing Howard Stark (father of Tony Stark) then after 70 years he should be around 90 or above.  Tony Stark, his son, should be 60 to 70 years.  Is that possible?  Tony doesn't look 70 years in The Avengers. I've got an HP Pavilion Touchsmart notebook that came with Windows 8. I've upgraded to 8.1, and now I want to dual-boot an Ubuntu distribution with Windows 10. When dual-booting with Windows 8.1, the Windows Boot Manager always took priority, even after installing GRUB. What do I need to do to get GRUB to be the default bootloader instead of Windows Boot Manager?