I have all of the following data types that I tried to use filters to santize them but I got zeros in the database instead of the actual data. So my question is what is a best practice to sanitize each one of these data types so that actual data goes into the database not zeros.   Also i hope I can ask this question too: What if user wants to update 1 of these fields and leave the rest as they were entered before, would the new post delete the others in the database?  Here is my code:  &lt;?php  require('included/header.php');   $database = new Database;   if(isset($_POST['submit'])) {     $fname = $_POST['fname'];         $lname = $_POST['lname'];         $profession = $_POST['profession'];       $phone = $_POST['phone'];       $fax = $_POST['fax'];       $filtered_email = $_POST['email'];        $workbio = $_POST['workbio'];       $employers = $_POST['employers'];       $years = $_POST['years_in_industry'];     // $radio = isset($_POST['radio']);      $database-&gt;query('INSERT INTO users (firstname, lastname, profession, phone, fax, email, projects, companies, exp_years)                  VALUES                  (:fname, :lname, :profession, :phone, :fax, :email, :workbio, :employers, :years_in_industry)');   $database-&gt;bind(':fname', $fname); $database-&gt;bind(':lname', $lname); $database-&gt;bind(':profession', $profession); $database-&gt;bind(':phone', $phone); $database-&gt;bind(':fax', $fax); $database-&gt;bind(':email', $filtered_email); $database-&gt;bind(':workbio', $workbio); $database-&gt;bind(':employers', $employers); $database-&gt;bind(':years_in_industry', $years);  $database-&gt;execute();  if($database-&gt;lastInsertId())      {         echo "&lt;p&gt;Profile Updated!&lt;/p&gt;";     } } ?&gt;
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?
Polynomial divisibility is unchanged by coeff. field extension I would like to verify the validity of the following line of thought:  Let $K \subset E$ be a field extension. Let $K[x]$ be the polynomial ring over $x$ and denote $K(x)$ its field of quotients (the rational functions over $K$).  Now assume $f(x)=g(x)h(x)$ with $f(x),g(x) \in K[x]$ and $h(x) \in E[x]$ and all $f$, $g$, $h$ are different than zero. Then $\frac{f(x)}{g(x)} = h(x)$ in $E(x)$. So $h(x) \in K(x)$. But $h(x)$ is a polynomial, so $h(x) \in K[x]$.  Is there any other simpler argument than that?  Added:  Let me be more specific. Let $x^p - a \in K[x]$, with $p$ being prime and $char(K)=p$. Let $b$ be the unique root of $x^p - a$ in its splitting field $K(b)$. Then $x^p - a=(x-b)^p \in K(b)[x].$ Let $m_b(x) \in K[x]$ be the minimal polynomial of $b$ over $K$. Then $m_b(x)$ divides $(x-b)^p$ and so $m_b(x)=(x-b)^l$ and $l$ is the smallest positive integer for which $(x-b)^l \in K[x]$. Let $p = lq+r$ where $0 \ge &lt;l$. Then $x^p-a=(m_b(x))^q (x-b)^r$. Can i conclude that $(x-b)^r \in K[x]$ and so $r=0$ by the minimality of $l$?  Thanks. How to roll back Ubuntu to a previous version? Reading shapefile using C#? I am new to ArcGIS and trying a few things..   I'm trying to read shapefile (which is supplied as an input) using C# and I want to generate a PDF file which contains underlying metadata information (similar to the Identify tool) ? Globally disable "include online search results" Are if and whether equivalent in sentences like the ones below?     How to determine if my saddle is too high?   How to determine whether my saddle is too high?         We should check if everything is okay now.   We should check whether everything is okay now. What is the best way to level up in Clash of Clans Find a combinatorial argument for the following binomial identity:   $$n(n+1)2^{n-2} = \sum_{k=1}^{n}k^2\binom{n}{k} .$$   Algebraic proofs can be found at  , and a related identity at  . I came across this formula in a list:  The number of ways of distributing $n$ identical objects among $r$ groups such that each group can have $0$ or more $(\le n)$ objects  I know that standard way of doing this is to solve the problem of distributing n identical objects and $(r-1)$ partitions among themselves which can be done in $C(n+r-1,r-1)$ ways.   But I am unable to prove to myself why it is not $(r+1)^n$.  Because each of the n objects has r+1 choices, either group1, group2,... group r or none at all. I am setting up a server where there are multiple developers working on multiple applications.  I have figured out how to give certain developers shared access to the necessary application directories using the setgid bit and default ACLs to give anyone in a group access.  Many of these applications run under a terminal while in development for easy access. When I work alone, I set up a user for an application and run screen as that user. This has the downside that every developer to use the screen session needs to know the password and it is harder to keep user and application accounts separate.  One way that could work is using screen multiuser features. They do not work out-of-the-box however, screen complains about needing suid root. Does giving that have any downsides? I am pretty careful about using suid root anything. Maybe there is a reason why it isn't the default?  Should I do it with screen or is there some other intelligent way of doing what I want? I have two lightning component placed on one page lightning app. First Component have refresh icon and I set onclick action to refresh Component $A.get('e.force:refreshView').fire(); but this event refresh the whole page instead of First component.  how can refresh only one component on page not all the page ? The number of solutions to an $n^{th}$ order differential equation. For an $n$th order differential equation, why are there always $n$ solutions? Why exactly $n$, not $n - 1, n+1$ or infinite many?    Addendum by LePressentiment :   This is motivated by P176 on Strang's Intro to Lin Alg, 4th Ed. An $n$th order differential equation, how many basis functions does it have? I'd guess $n$, because the diffl eqn have $n$ linearly independent solutions (predicated on Julián Aguirre's answer), all of which look to span the nullspace/solution space of the homogeneous ODE. Am trying to Update Leads.  When Lead converted flag is true.  Lead Status is Contacted. I have to update all the contacted leads to Converted.  Am Getting this error on the data loader:     ERROR: cannot reference converted lead   Maybe because converted leads cannot be updated because they are locked out once they are converted?  Is there a workaround to update Lead Status to Converted from Contacted? Like when you want to say that you'll tell a short version of something which would alter the accuracy of the original version.  I was thinking of "In a nutshell" and "To make a long story short", but I felt like those phrases did not place emphasis on the "there might be an insignificant loss of accuracy" aspect. Is it possible to set the GPU fan speed using the default free ati driver?  My card (X1900) was deprecated in the fglrx drivers a while back.  The free drivers seem to work with 3D, Compiz and such, but running graphics intensive programs makes my GPU heat up and produce artifacts, while the GPU fan never seems to increase. (When set to 100% in Windows it makes a massively louder noise.) Is $\frac{1}{\sqrt{2}}$ a fraction or not?   I just came across a Grade 8 student's class work where the teacher has given the above as an example to differentiate fractions from rational numbers. I think this is wrong fundamentally, as $\sqrt2$ is irrational while all fractions would be rational. Please advise. Thanks! "that which" used together When I read essays from Eliot, I find him using "that which" frequently, e.g.        the combination which is the murder of Agamemnon is probably as complex as that which is the voyage of Ulysses.   A very small part of acting is that which takes place on the stage!   They belong to a different race. Their crudity is that which was of the Roman, as compared with the Greek, in real life.      I can kind of guess its usage, but I want to know more about this grammar structure. Searching on Google mostly gave me the simple difference between "that" and "which", and some examples using "that which":        that which we call a rose (from "Romeo and Juliet")   that which we persist in doing      It is a pity that Google search does not direct me to any useful page about "that which".  Can someone explicate its grammar for me? How do I use filenames that start with a dash "-" as command arguments? This may be a simple question, but how do I use files starting with "-" with command line programs?   For example,  I am trying to use pdfgrep on a file named -2013-01-01.pdf but it complains that there are no options defined for 2, 0, 1, 3 and so on.  Changing the filename to something that does not start with "-" solves it, but this is not an option since the files aren't created by me. I simply want to check for a specific change I know is coming. Can I change the color of the last selected face, so that it is the same as the other selected faces?  Here, I've selected the left face then the right face. Note the right face is some sort of checkered or dithered pattern, and just the outline has the nice orange 'selected' color.    Here I've selected the top face, note the right face has now the nice color.    And here I've deselected the top face. Now, both of the remaining selected faces have the nice color. This is the result I'd rather see instead of image 1. I often see tutorials on the web or posts on this site which make heavy use of the following characters at the command line. Often it seems that they are used for pretty similar purposes. What are the differences between them when used on the command line or for shell programming? For what purpose do I use which of them?  " " double quotes  ' ' single quotes  ` ` backticks If I want to draw an overline over some text, not an equation, how can I do it? \overline seems to only work in math mode, and when used outside of math mode, it automatically says "Missing $ inserted".