My question is how to be the most annoying possible to someone trying to do a sql injection, I probably did not really express right what i was trying to do and looking for in what I wrote blow.    Thanks to everyone for your help in advance. I am trying to learn MySQL.  I was going to set up a database to practice with but I was on here reading and looking for examples, and kept seeing people saying they where going to get an SQL injection.   I have been reading about this for a while now, and I'm getting more confused the more I read. I have decided to go with PDO to prevent this. Even though from what I read it's the prepared statements that makes it safe, and I will still have to whitelist it.    My question is if someone can give beginners like myself a set up we can use that will be pretty effective at stopping these attacks. From what I understand it seems almost impossible to stop them, I saw someone say something about the dns is the only sure way. I would like to learn to do this the right way even though I probably don't need too much security right now.   If I'm not wrong, they can still use blind injections even if you use PDO.  If so, I was thinking of adding a delay of 2-5 seconds or something like that. I don't know if that would be too much on the user end, I'm just learning, and have no real world experience.   Also the type of things I will be doing, will probably be very basic for now... mom &amp; pop type stuff. If I build someone a site with a user name and password I don't want them to get these attacks, I just don't like it. So if it is a little slow but more secure I would like to be at least able to give them that option.  My thinking is to be really annoying to them and hopefully not be worth it.   From what I read also the length of the table names or user names can make it harder for them, say using phrases instead of just 6-8 letters.   Also I think least privilege will help as well, but there seems there is always a way around everything, and if you're new and don't know exactly what your doing, you're going to be vulnerable.   I have copied code from somewhere that I was going to adapt for my needs, but I really have not tried to put together what I'm looking for yet, still in the reading and learning phase.   &lt;?php   require_once "dBug!.php";  $dsn = "mysql:host="; $user_name = ""; $pass_word = "";  $connect = new PDO($dsn, $user_name, $pass_word);  $sql = "SELECT * FROM books WHERE id &lt;= 10";     $result = $connect-&gt;prepare($sql);  $status = $result-&gt;execute();   if (($status) &amp;&amp; ($result-&gt;rowCount() &gt; 0)) { $results = array();   while ($row = $result-&gt;fetch(PDO::FETCH_ASSOC)) {     $results[] = $row; }   new dBug($results);  }  $connect = null;   ?&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?
How does a Support Vector Machine (SVM) work? Sending a value to JavaScript I have set theme handler for a form in Drupal and this handler has a template file. What is the easiest way to send a value from PHP to JavaScript in that include file? I have functionality on a cloud page that depends on the cloud page url. I know how to Requestparameter(), but how do I get the entire url using ampscript or SSJS? regex error - nothing to repeat Whenever I try to do a fluid simulation, the fluid domain remains visible.  I have tried:ctrl+a-scale, turn on/off visibility for render/viewport  Here's a video demonstrating my problem:   Here's the blend file in case I have messed up some settings:   Thank you for any help! A great Python IDE for Ubuntu How can I let player click text to use a command? I want players to be able to click text to run an OP command even if that player is not an OP. For example something like:  Console: Do you want to enable Fly? [If you do, Please click here]  *Player1 clicks that text*  Console: /fly Player1   Is something like this possible? Laravel 4.1 Run migrations and update configuration from package dependencies I am trying to use following apex class with invocable method but its not showing in process builder.  global with sharing class SlackOpportunityPublisher {      private static final String slackURL = 'https://testsalesforceapps.slack.com/';      global class Oppty {         @InvocableVariable(label='Opportunity Name')         global String opptyName;         @InvocableVariable(label='Stage')         global String stage;     }      @InvocableMethod(label='Post to Slack')     global static void postToSlack(List&lt;Oppty&gt; oppties) {         Oppty o = oppties[0]; // If bulk, only post first to avoid overloading Slack channel         Map&lt;String,Object&gt; msg = new Map&lt;String,Object&gt;();         msg.put('text', 'The following opportunity has changed:\n' + o.opptyName + '\nNew Stage: *' + o.stage + '*');         msg.put('mrkdwn', true);         String body = JSON.serialize(msg);             System.enqueueJob(new QueueableSlackCall(slackURL, 'POST', body));     }      global class QueueableSlackCall implements System.Queueable, Database.AllowsCallouts {          private final String url;         private final String method;         private final String body;          global QueueableSlackCall(String url, String method, String body) {             this.url = url;             this.method = method;             this.body = body;         }          global void execute(System.QueueableContext ctx) {             HttpRequest req = new HttpRequest();             req.setEndpoint(url);             req.setMethod(method);             req.setBody(body);             Http http = new Http();             HttpResponse res = http.send(req);         }      }  } Should smilies be turned into images in questions and answers? A lot of mention has been made of the seriousness of Stack Overflow (and presumably Server Fault). Would it be a good idea to turn  :-) into actual images as per  in questions and answers? Recently I've noticed more and more sign-in / sign-up workflows defaulting to the sign-up option first and providing a minimal "Sign-In / Login" action somewhere else on the page. What's the reason behind this practice?  Examples where I've seen this recently: Get top results for each group (in Oracle) I have a Python regular expression that contains a group which can occur zero or many times - but when I retrieve the list of groups afterwards, only the last one is present. Example:  re.search("(\w)*", "abcdefg").groups()  this returns the list ('g',)  I need it to return ('a','b','c','d','e','f','g',)  Is that possible? How can I do it? Local SEO Strategies What are your strategies for local SEO? For example, if you had a web design company in Lincoln, Nebraska, what would you do for your website from an SEO perspective? My 5 year- old daughter is constantly defiant! My 5-year old daughter is very defiant.  It started getting bad about 6 months ago. She doesn't do what she is told, and any time she hears the word "no" she throws terrible, dramatic fits, screaming ridiculously loud, and in some cases hitting.  She refuses to make eye contact when I warn her to stop doing something even when I am down at her eye level and it takes multiple orders to finally get her to look at me. She constantly tells me no.  I feel like I constantly tell her no and that she feels this gives her the right to tell her father and I no.  I have tried time outs which are not effective at all; she only throws a fit the whole time, never seeming to run out of wind. Spankings are only effective until the shock of the action itself wears off and then she returns to the same behavior.  My husband and I recently took away ALL of her toys/ possessions being she is a pretty materialistic child (she loves getting toys and always wants something new). We told her that if she was good and listened and stopped telling us no and throwing fits, that after three days we would let her choose three boxes of toys to bring back in her room. This worked but as soon as she got those three boxes unpacked, we packed them back up because she went right back to the no's and fit-throwing within a few hours.  I am mainly the one disciplining her and I feel she is definitely the most defiant with me. I believe in explaining to her why things are not OK and why I tell her no, but I really don't feel it helps and I never feel as if she listens to what I tell her.  I am at my wits' end and feel like a failure of a mother. She is my first and only child, and the only grandchild on both sides of our family. She is an angel at school but home is completely different.  I need help figuring this out but nobody I talk to really has any advice for me. I am at the point where I am wondering if she or I need counseling because I feel out of options. Prove Equivalence Relation in G Hei, guys!  I'm having some trouble with the next problem:  Let $A$ and $B$ be subgroups of $G$. Show that $\sim$ is an equivalence relation when it is defined as follows: $g\sim g'\Leftrightarrow g' = agb$ for some $a$ from $A$, $b$ from $B$.  Should I prove this is valid for any a and b? It says for some elements a and b. But I might as well take the unit element.   Could you give me a clue on how to solve it?  Cheers! Loading multiple GPX files at once? I have a whole bunch of GPX files that I need to load into QGIS and loading them one at a time using the GPS plugin is a bit painful.  It will not allow one to select multiple files -- is there another way?  I did find this:  but I need to figure out a lot more about PostGIS and GDAL before trying that approach.  BTW I am using Mac version of QGIS -- just realised that this may be OS related I am Sri-Lankan staying in Bangladesh working in well established company in Bangladesh. I, my wife and two kids applied for Schengen visa from German embassy in Dhaka. I got only sponser letter from my paternal uncle in Germany. We submit all company letter, bank account, school letters, insurance, booking air tickets, etc.  Our visa refused and the reason given "your intention to leave the territory of the member states before the expiry of the visa could not be ascertained" so I want to know what it mean. And how I apply again fix by this reason? Our annual vacation starts on 15 July for one month. I applied visa for 15 days. We plan to stay 15 days in Germany and travel to Sri Lanka and back to Bangladesh. Copy from Evernote to Paste to Wordpress preserving formating Is it possible to post texts directly from the Windows desktop Evernote application to Wordpress, and retain the formating? Simple copy/past leads to format break. Compute approximately the probability that more than 50 of the observations of the random sample are less than 3. Let $X_1,X_2,...,X_n$ be a random sample of size $n = 72$ from a distribution with probability density function $f(x) =\begin{cases} 1/x^2,&amp; 1 &lt; x &lt; infinity\\0,&amp;\text{otherwise}\end{cases}$ Compute approximately the probability that more than $50$ of the ob- servations of the random sample are less than $3$.