I have a (subject) and (page) TABLES in a database.  page TABLE belongs to subject TABLE, each subject has an ID  When user click on a subject mysite/blog?subject=(ID gets set__) 1,2,3,4,5  So i want pages to be INSERTED according to in which subject they are in URL.  Well, i'm sending data using POST form to a (form_process.php) page.  &lt;?php             if(isset($_POST["submit"])){          $Message = $_POST["Content"];           $query  = "INSERT INTO page ";          $query .= "(Message, SubjectID) ";          $query .= "VALUES ('{$Message}', $_GET['subject'])";          $result = mysqli_query($connection, $query);           if(mysqli_affected_rows($connection) &gt; 0){            echo "Page added to its beloging subject";          }      } ?&gt;   I get this error:       Notice: Undefined index: subject in   C:\xampp\htdocs\kerimgrozny\public\blog.php on line 64   The problem is: when using $_GET variable in INSERT query as FOREIGN KEY, It gets undefined.  The link on GitHub:
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?
Additional Drivers for Ubuntu 17.10 The Additional Drivers settings interface is no longer available in Ubuntu 17.10  How can I install proprietary drivers in Ubuntu 17.10?  I need drivers for Wifi &amp; Bluetooth (BCM43142) and Intel Graphics.  The earlier Additional Drivers program showed a package named jockey but it no longer seem to exist in repositories. Finding Elevation Change, any method So, I think it'd be cool - for goal setting for example - if I could keep track of my elevation change.  The problem is, the local cyclocomputers I looked at seem to use barometric pressure to determine the change.  This is fine, unless some weather is moving in, which happens not infrequently in the Midwestern United States.  Or do some of them try to use an inclinometer, your speed, and some math you learn in Calculus II to keep track of your change?  That would seem more accurate!  I could try to use a GPS meter, but those things are expensive -  and based on back when I had service to my smart phone, not guaranteed to match my car's odometer for distance even - I've read from some other riders that the distance varies at least slightly from local measurement on a bike as well.   Alternatively, let's say that I ride along a known route.  Is there any good way of plotting that route for elevation change?  Thanks! bordermatrix with blocks I need to write a complicated matrix, that has a structure as in the attached picture. Linux: Case-INSENSITIVE Filesystem Viruses: Adaptation to a new host through repeated host jumps Setting a fill and border is pretty easy in apps like Illustrator and Gravit Designer but in Blender. I've found it to be more tedious as I can't find anything online to solve this problem.  The picture above is a simple 2d mouth with lips. I would like to be able to move the lips and still have a fill but in Blender I needed to add another path for the mouth. Is there anyway I can move my lips path while having it also take the exact same shape (but not material) as my mouth's path?    (454.2 KB)  I work in Blender 2.79 cause 2.8 doesn’t run well on my laptop at all. Travel to Ireland (Dublin) with U.K. Visitor visa How to prove $B-A \succeq 0 \Leftrightarrow$ ellipsoid $x^TBx \leq 1$ contains $x^TAx \leq 1$? Assume $A \in \textbf{S}^n_{++}$, an ellipsoid centered at the origin given by $$\mathcal{E}_A = \{x\mid x^TA^{-1}x \leq 1\}$$ Then we have $\mathcal{E}_A \subseteq \mathcal{E}_B $ if and only if $B-A \succeq 0$. This is the proposition in the Boyd &amp; Vandenberghe's  (pages 45-46). The authors gave only the result, without proof. How to prove it? To show that $\sum a_nb_n$ is absolutely convergent If $G$ is a finite $p$-group with a nontrivial normal subgroup $H$, then the intersection of $H$ and the center of $G$ is not trivial. Difference between Login Shell and Non-Login Shell? I understand the basic difference between an interactive shell and a non-interactive shell.  But what exactly differentiates a login shell from a non-login shell?  Can you give examples for uses of a non-login interactive shell? How to add coloured line before caption? What is the pressure at the center of the Earth? (Or a neutron star) The  has microgravity and is thought to be solid and almost 6000 degrees hot. What is the pressure like there? The confusing thing, for the common man I suppose, is that there's no gravity there, but lots of matter around it which does gravitate towards the center. How does that add up? Is the center just a gas cloud or is it highly compressed?  And I could add the aside question about what it is like in the microgravity center of a  or a black hole, but I don't expect anyone to know about that. Word for a person with a negative attitude Which is better to do client side or server side validation?  In our situation we are using    jQuery and MVC.   JSON data to pass between our View and Controller.     A lot of the validation I do is validating data as users enter it. For example I use the the keypress event to prevent letters in a text box, set a max number of characters and that a number is with in a range.   I guess the better question would be, Are there any benefits to doing server side validation over client side?    Awesome answers everyone. The website that we have is password protected and for a small user base(&lt;50). If they are not running JavaScript we will send ninjas. But if we were designing a site for everyone one I'd agree to do validation on both sides. effect of mass of spring on period of oscillation Consider a massless spring system which is hanging vertically. Attach a mass $M$ and set it into simple harmonic motion. Let the period with which the mass oscillates be $T$.   We assume that the spring is massless in most cases. Would taking effect of the non-zero mass of the spring affect the time period ($T$)? In the neural network literature, often we encounter the word "tensor".  Is it different from a vector? And from a matrix? Have you got any specific example that clarifies its definition?  I'm a bit confused about its definition. Wikipedia doesn't help and sometimes I have the impression that its definition depends on the specific machine learning environment used (TensorFlow, Caffee, Theano). What is the use for non-inverting input resistance in a negative feedback opamp? Here in the Figure R5=50K. This resistor value is not in the equations to obtain output voltage, and in many tutorials non-inverting input is directly grounded without a resistor. What might be the reason to use it here? What is the command to truncate a SQL Server log file? I need to empty an LDF file before sending to a colleague.  How do I force SQL Server to truncate the log? Intersecting transparent object causing artifacts in cycles When two objects -one of them transparent- intersects it creates some artifacts visible even in the alpha channel. Even with 1024 transparent bounces the artifacts remain.    In the example file there are two cubes in the same position, one transparent and one emission.    What is causing this? Any way to get rid of this artifacts?