I'm trying to insert data into a Webmin MySQL Database, but every time I hit submit on my form, It doesn't put the information in the MySQL database. I ran a test and it's running all the way to the INSERT part but it still didn't put anything in the DB. I can read from it just fine, but I can't write to it. I have all the permissions, but it still doesn't work. It also get all of the variables ($tblusername, $tblemail, $tblpassword). Here's my PHP (I'm using PDO.) Please help! &lt;?php     if(isset($_POST['submit'])) {         try {         $tblusername = $_POST['Username'];         $tblemail = $_POST['Email'];         $tblpassword = $_POST['Password'];          $conn = new PDO(&quot;mysql:host=$servername;dbname=mealplan&quot;, $username, $password);         $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);         $stmt = $conn-&gt;prepare(&quot;SELECT UserName FROM tblUsers&quot;);         $stmt-&gt;bindParam(1, $tblusername, PDO::PARAM_STR);         $stmt-&gt;execute();          if($stmt-&gt;rowCount() &gt; 0){         die(&quot;Username already in use!&quot;);         }else{           $sql = &quot;INSERT INTO `tblUsers` (`UserName`, `Email`, `UserPassword`) VALUES ($tblusername, $tblemail, $tblpassword)&quot;;           $stmt = $conn-&gt;prepare($sql);           $stmt-&gt;execute();         }       } catch(PDOException $e) {       echo &quot;&lt;style&gt;.hidden { visibility: visible; } .shown { visibility: hidden; font-size: 0px }&lt;/style&gt;&quot;;       }     } ?&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?
Changing projection of shapefile in QGIS How do I change the projection of my shapefile using QGIS? The default projection is set to EPSG:3003, I want to change it to WGS84 EPSG:32632. When I do a reprojection or I change projection in the properties mask I don't have the correct result. On the left, I have the plan coordinates but they are not correct for the EPSG shown on the right: My printer does not print light magenta. (Canon MP220 - CL-38) I have a Canon MP 220, with new cartridges. Prints fine everything, but it won't print light magenta. I cleaned it and deep cleaned it many times. I have no idea what could be the problem. Cartridge models: CL-38 and PG-37.  Any ideas ?  LE: Now it won't print magenta at all! Good reasons to prohibit inheritance in Java? In 2018, Kyle Reese (a normal civilian who wasn't part of Resistance) was on the top in the hit list of Skynet. It means that Skynet of that time had information from future about Kyle Reese being father of future leader of human resistance. Right?  Why didn't Skynet kill Kyle Reese instantly after his detection kicking John Connor out of existence? What software do you use to keep up to date on literature, and if Google Scholar, how do you avoid information overload? Strip HTML from Text JavaScript Any good resources for Lagrangian and Hamiltonian Dynamics? I'm taking a course on  and  Dynamics, and I would like to find a good book/resource with lots of practice questions and answers on either or both topics.  So far at my university library, I have found many books on both subjects, but not ones with good practice questions and answers. I have Schuam's outline of Lagrangian Dynamics, but didn't really find a lot of practice questions.  Any suggestions would be greatly appreciated! Forward an invocation of a variadic function in C Why did Terence Tao write Proposition 2.1.11 about mathematical induction in "Analysis I"? I accidentally unset all the directories of $PATH while trying to add a new one in ~/.bashrc. I opened a new terminal window as I was editing and now $PATH is empty. I'm worried if I boot from another drive to find the $PATH I won't be able to boot into this drive again.  Basically, what is the default result of echo $PATH? calculating resistance for LED strips to use as parking lamps and turn signals I'm installing LED strips in my car's tail lamps to convert it from conventional bulbs to LEDs. I have a understanding of what I'm doing but not the complete knowledge to make the circuit work correctly without doing some guessing so I figured I would ask here.   I'm planning on working with and I need a length of 16", 15" and 14" to make then look correct in my housings. When I did the math the 19.7" strips have about 1.5 LEDs per inch and need to be segmented into 3 LED groups so I may have to get creative with the placement.   Ffom what I understand I need 2 diodes and a resistor. One diode on the parking lamp power, and one on the turn signal/brake power and then a resistor on the parking lamp  wire to step down the voltage enough to make them dim enough to use as a parking lamp and distinguish it from the brighter turn/brake lamps.  Does anyone know what size resistor and what size diode to use in this project? The voltage, with the car running, is around 13.8V to the rear lamps. I figure it should be running around 7V to the LEDs to light them as parking lamps.  Also will leaving out a cluster of 3 LEDs change the strips intensity to where I'll need different resistors for each strip? What is the expected value of the number of die rolls necessary to get a specific number? Given a discrete random number generator, such as a six-sided die, what is the expected value of the number of rolls necessary to roll a specific number (e.g. a six)?   I think the result should be given by E$\langle$rolls$\rangle$ = $\frac{1}{6}\sum_{n=0}^\infty{(\frac{5}{6})^n(n+1)}$, but I don't know how to calculate the convergence of that sum.  Also, how do I calculate the variance? A malevolent computer with AI takes over a woman's house with the intent of hybrid computer/human procreation. The evil computer seals off the house with the woman in it and keeps her prisoner while it prepares. I read the tale sometime in the late 80's or the early 90's. It was one of many of my missing books that got yardsaled by my in-laws when I wasn't looking. It may also have been made into a movie, but I didn't see the film. Why doesn't a bike/bicycle fall if going with a high speed? Why does a bike/bicycle fall when its speed is very low or close to zero and is balanced when going with a high speed? How to Disable new terms (free tagging) with Taxonomies? I have a "term reference" field, in a form that uses an auto-complete widget. I want to limit user input to terms in the vocabulary only, and output a message when a user tries to enter a non existing term.  I found the  module. However this does not work with forms that contain a field collection or a field group.  There is also a contributed patch . But I was wondering whether there was a simpler/cleaner solution like a module or maybe I missed an already existing way of doing it with latest drupal and taxonomy versions. When running a Java app from eclipse my ImageIcon shows up just fine.  But after creating a jar the path to the image obviously gets screwed up.  Is there a way to extract an image from the jar at runtime so I can then open it up?  Or, is there a better way to do this?  I'd like to distribute a single jar file if possible. Cubic polynomial with three (distinct) irrational roots I am looking for an equation     $$x^3+ax^2+bx+c=0, \qquad a, b, c \in \Bbb Z,$$   of degree $3$ that has $3$ different roots.  For an equation of degree $2$ it is easy---for example $x^2-2=0$---but I can't find an example for degree $3$.  if there is a method for finding this kind of Equation I will be grateful. stl::multimap - how do i get groups of data? Multimap essentially has groups of data sorted by the key. I want a method by which I could access these individual groups and get their aggregate values. For example, in a std::multimap&lt; string, int &gt; I store   {"Group1", 1},  {"Group1", 2},  {"Group1", 3},   {"Group2", 10},  {"Group2", 11},  {"Group2", 12}   Having stored these values, I should be able to iterate this multimap and get the aggregate values of each "group". Problem is there aren't any functions defined in STL to access MultiMaps in such a way. I could use lower_bound, upper_bound to manually iterate the multimap and total the group's contents, but I am hoping there could be better ways already defined in STL ? Can anyone propose a solution as to how I could get the aggregate values for a group in the above example. I was working with a new C++ developer a while back when he asked the question: "Why can't variable names start with numbers?"  I couldn't come up with an answer except that some numbers can have text in them (123456L, 123456U) and that wouldn't be possible if the compilers were thinking everything with some amount of alpha characters was a variable name.  Was that the right answer?  Are there any more reasons?  string 2BeOrNot2Be = "that is the question"; // Why won't this compile? Let $x$ and $y$ be integers not congruent to $0$ modulo $p$ where $p$ is a prime. Prove that if $p \equiv 3 \pmod{4}$ then $x^2+y^2 \not \equiv 0 \pmod{p}$.   I thought about proving this algebraically and by contradiction. So we say $x^2+y^2 = pz$ and have to show this is impossible.