I have HTML form with three Submit Buttons. One is for reloading the page, the other one makes a database entry and the last one is a simple login button. Each button is also in a div.   When i try to login, i normally enter my username &amp; password and then press enter (Im not tabbing out of the textbox). But instead of pressing the button "login", it presses the button "reload".   I found some ways with Javascript, JQuery and AJAX, but im not allowed to use any of these. All i use is PHP, CSS and HTML.  Is there a way to choose which Button i want to press when i use enter?  edit:  This is the form with the three submit buttons:  &lt;form method="post"action="Sub.php"&gt; &lt;input type="text" id="txt" name="txt" value="text"&gt; &lt;input type="submit" id="refresh" name="refresh" value="Refresh"&gt; &lt;input type="submit" id="update" name="update" value="Update"&gt; &lt;input type="submit" id="login" name="login" value="Login"&gt; &lt;input type="text" id="txt" name="txt" value="text"&gt;&lt;/form&gt;   This is the file, where i post it.  &lt;?php if(isset($_POST['login'])) {echo "Login has been pressed";} if(isset($_POST['update'])) {echo "Update has been pressed";} if(isset($_POST['refresh'])) {echo "Refresh has been pressed";} ?&gt;   If i tab through the first file and press enter in one of the textboxes, i will allways press the submit button with the value "refresh".
I have two submit buttons in a form. How do I determine which one was hit serverside?
How to view monitor refresh rate in macOS? I just purchased a Dell P2175Q monitor for my 15" MBP w/Touchbar. I'm connecting with a USB-C to DisplayPort cable, but when I go to Apple > System Preference > Displays, there is nothing about the Refresh Rate. Pressing the Option key does not show any additional options.  I've seen countless screenshots where this information should appear. Is there another way to check the refresh rate?  I'm on macOS 10.13.4  Thanks. Number of possible combinations of x numbers that sum to y I want to find out the number of possible combinations of $x$ numbers that sum to $y$. For example, I want to calculate all combination of 5 numbers, which their sum equals to 10.  An asymptotic approixmation is also useful. This question seems to be very close to number partitioning, with the difference that a number can be 0. See:    All possible partitions for sum 10 and 3 positions that can be zero, are 63 possiblities: (numbers shown as 3 digits)  019 028 037 046 055 064 073 082 091 109 118 127 136 145 154 163 172 181 190 208 217 226 235 244 253 262 271 280 307 316 325 334 343 352 361 370 406 415 424 433 442 451 460 505 514 523 532 541 550 604 613 622 631 640 703 712 721 730 802 811 820 901 910 Let $A \in Mat_{n \times n}(F)$ a matrix which satisfies $A^n=0$ and $A^{n-1} \ne 0$ for some positive integer $n$. Let $v \in F^n$ be such that $A^{n-1}v \ne 0$.  Prove that $\{v, Av, A^2v,...,A^{n-1}v\}$ is a basis for $F^n$.     So, from definition of $A$, I know that $A^iv \ne 0$ for all $0\le i \le n-1$. I know I need to prove the set is linearly independent and span $F^n$ to prove it's a basis, but I just don't know how. Does removing an iPhone from my icloud account also erase the data? I lost my iPhone 6S recently. I think it fell off my car and was crushed because it has been offline (according to Find My iPhone) ever since. I want to erase the phone and remove it from my iCloud account since the phone is gone.  However, I can't erase the phone until it comes back online. I do have the option to remove the device from my iCloud account. If I remove the phone from my iCloud account, does that also erase the data? The phone has a password on it, will it continue to be locked in case someone finds it after I have removed it from my iCloud account? Question:   Answer:   The question was closed at 11:57:57 (according to the hover-over-"x-mins-ago" bar) and the answer was posted at 12:16:35. It's a fairly lengthy answer, so it's possible that it was started to be written before it was closed but I swear I've started to answer a question then I got a banner along the top saying "this question has been closed" and the answer was no longer post-able. Snap packages each have their own copy of dependencies. This means there are lots of packages in each snap, which would equate to large package sizes. Wouldn't this mean that snaps would be so much bigger than traditional debs? How can I make them smaller? I have limited space. How do I rename a domain and preserve SEO? As part of graduating from Area51 and becoming a full fledged site we sometimes change domain names from http://topic.stackexchange.com to http://example.com. Aside from the obvious 301 redirect rules to support existing urls transparently, are there other techniques that would aid in the preservation of SEO? Foreign key constraint on array member? Suppose I have a table containing job roles:  CREATE TABLE roles (   "role" character varying(80) NOT NULL,   CONSTRAINT "role" PRIMARY KEY (role) );   Suppose I further have a table, users, and each row (a specific user) can have an arbitrary number of job roles:  CREATE TABLE users (   username character varying(12) NOT NULL,   roles character varying(80)[] NOT NULL,   CONSTRAINT username PRIMARY KEY (username) );   I should probably make sure that each member of users.roles[] exists in roles.role.  It seems to me that what I want is a foreign key constraint on each member of users.roles[] such that if references roles.role.  This doesn't seem possible with postgres.  Am I looking at this the wrong way?  What is the suggested "right" way to handle this? How to determine if Javascript object is an event? I have a directory containing a large number of files. I want to delete all files except for file.txt . How do I do this?  There are too many files to remove the unwanted ones individually and their names are too diverse to use * to remove them all except this one file.  Someone suggested using   rm !(file.txt)   But it doesn't work. It returns:  Badly placed ()'s    My OS is Scientific Linux 6.  Any ideas? How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help. Who are the users that work for Stack Overflow? I want to plot the function 1/(x²+y²), but since it tends to infinity in (0,0), I get a horrible plot:  \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}   \begin{axis}[grid=both]     \addplot3 [surf] {1 / (x^2 + y^2)};   \end{axis} \end{tikzpicture} \end{document}     By restricting the domain of z, I get anyway a not so nice plot:  \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}   \begin{axis}[grid=both,restrict z to domain=0:1]     \addplot3 [surf] {1 / (x^2 + y^2)};   \end{axis} \end{tikzpicture} \end{document}     I would like to get something smooth, which finish in a circle (the circle of the intersection of this function with the plane z=1 for example).  Something like this would be great: I don't believe it's true that all submodules of a finitely generated free module are free just based on results from google. Is there a canonical simple example of a finitely generated free module with a submodule that is not free? Finding all solutions for a system of equations with constraint on the sum of absolute values I am looking for a fast algorithm to find all integer solutions for the following system of linear equations ($c_1,\ldots,c_n \in \mathbb{Z}$ and $r\in \mathbb{N}$ ):  $x_1+x_2=c_1$  $x_3+x_4=c_2$  ...  $x_{2n-1}+x_{2n}=c_n$  $|x_1|+|x_2|+\ldots+|x_{2n}|=r$  $x_1,\ldots,x_{2n} \in \mathbb{Z}$   Also can we find the number of solutions before solving the system? Why don't I hear any sound after calling the Beep function in Windows 7? Should the first word after a colon be capitalized? What are all the correct answers to the Squirrel's questions, and what is the reward when I get them all correct? I just wanted to ask whether there is any command which would work on common shells (bash, dash, kornshell)? It is supposed to check if the line variable contains any part of the path.  if [[ $line =~ "$PWD"$ ]] ;then Below is a visual proof (!) that $32.5 = 31.5$. How could that be?    (As noted in a comment and answer, this is known as .)