I am trying to send two variables to my PHP file to insert them into a database. One variable is called 'skuLabel', which is just text and the other is 'jsonString', which is a JSON representation of a canvas design. When I just try to send the 'skuLabel', it works fine and inserts it like I would expect. But, when I send either just the 'jsonString' or both, my PHP errors that the two indexes do not exist when I try to access them. I've been working on this for several days now, trying many different methods, all with the same result. This is my first attempt at using AJAX, so I am sure I am doing something simple wrong. I appreciate any help anyone can give!   Here is my code:  var skuLabel = document.getElementById('sku').value; var jsonString = JSON.stringify(canvas.toDatalessJSON()); $.ajax({     type:   'POST',     url:    'uploadDesign.php',      dataType: 'json',     data:   {sku: skuLabel, json: jsonString},     success:              function(data){                 alert(data);             } });   And PHP:  $sku = $_POST['sku']; $jsonData = $_POST['json']; if($mysqli-&gt;query("INSERT INTO designs (sku, jsonData) VALUES($sku, $jsonData)")===TRUE){     printf("Inserted successfully.\n"); }
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?
Question is pretty much in the title: is it possible for an alliance to win as one, instead of a single player being the winner?  And if there is such way, is there a difference between classic and disharmony? Are real guns used in movies? Evaluate definite interval of normal distribution Find the limit of $\sum\limits_{k=1}^n\left(\sqrt{1+\frac{k}{n^2}}-1\right)$ C# - how can I get owner's name for a Mutex I have a shared mutex between 2 applications. I want to create an administration console that shows the current owner's name of the mutex.  How can I get the application name that currently owns the Mutex? Extracting one band from three band raster in ArcMap? I recently installed an SSD and AFAIK Ubuntu makes a weekly FSTrim on SSD's that support it.  Is there a log file of this trims? Sum of the series $\sum _{ r=1 }^{ \infty }{ \frac { { r }^{ 3 } }{ r! } } $ How do I prove that the sum of the series  $1+\frac { { 2 }^{ 3 } }{ 2! } +\frac { { 3 }^{ 3 } }{ 3! } +\frac { { 4 }^{ 3 } }{ 4! } +.... = 5e$ Changing email addresses on my @me.com and @icloud.com How to integrate mv command after find command? I am searching for files which name which contain AAA within their path using following command:  find path_A -name "*AAA*"   Given the output showed by the above command, I want to move those files into another path, say path_B. Instead of moving those file one by one, can I  optimize the command by moving those files right after the find command? How many ways can $b$ balls be distributed in $c$ containers with no more than $n$ balls in any given container? What is object slicing? Someone mentioned it in the IRC as the slicing problem. What does "Could not find or load main class" mean? At the end of a letter, is it correct to omit "I am" in this sentence?     I am looking forward to hearing from you   Then it will become:     Looking forward to hearing from you What are the differences between "-" and "--" in commands? I often see a single dash - or double dash -- followed by linux commands or other installed linux programs.   What are the differences between single dash and double dashes?  Is it just about abbreviation?  For example, -v means --verbose most of the time. I have an issue with my Minecraft launcher - I downloaded modpack for minecraft then the launcher started an update for the modpack version which it's 1.6.2, however then I started to get the issue      [15:40:59 ERROR]: Gave up trying to download      for job 'Version &amp; Libraries'      [15:40:59 ERROR]: Job 'Version &amp; Libraries' finished with 26   failure(s)! (took 0:01:06.362)   At the same time I had just downloaded Avira antivirus and ran it, but unfortunately  removing it and trying again didn't help. I've tried to restore the system to the point before downloading the antvirus and the mod pack a 2 days ago, I've tried turning off the firewall and I have tried removing the whole .minecraft folder all with no luck at all. I can't figure it out, all the servers are working and I have good internet connection but some of the files download fine and other don't.  The full log is here:  [15:40:59 WARN]: Couldn't download https ://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar for job 'Version &amp; Libraries' java.net.SocketTimeoutException: connect timed out         at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) ~[?:1.7.0_45]         at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[?:1.7.0_45]         at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[?:1.7.0_45]         at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[?:1.7.0_45]         at java.net.PlainSocketImpl.connect(Unknown Source) ~[?:1.7.0_45]         at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:1.7.0_45]         at java.net.Socket.connect(Unknown Source) ~[?:1.7.0_45]         at sun.security.ssl.SSLSocketImpl.connect(Unknown Source) ~[?:1.7.0_45]         at sun.net.NetworkClient.doConnect(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.http.HttpClient.openServer(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.http.HttpClient.openServer(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.https.HttpsClient.&lt;init&gt;(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.https.HttpsClient.New(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) ~[?:1.7.0_45]         at java.net.HttpURLConnection.getResponseCode(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source) ~[?:1.7.0_45]         at net.minecraft.launcher.updater.download.ChecksummedDownloadable.download(ChecksummedDownloadable.java:49) ~[launcher.jar:?]         at net.minecraft.launcher.updater.download.DownloadJob.popAndDownload(DownloadJob.java:108) [launcher.jar:?]         at net.minecraft.launcher.updater.download.DownloadJob.access$000(DownloadJob.java:12) [launcher.jar:?]         at net.minecraft.launcher.updater.download.DownloadJob$1.run(DownloadJob.java:89) [launcher.jar:?]         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.7.0_45]         at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.7.0_45]         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.7.0_45]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.7.0_45]         at java.lang.Thread.run(Unknown Source) [?:1.7.0_45] [15:40:59 ERROR]: Gave up trying to download https ://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar for job 'Version &amp; Libraries' [15:40:59 ERROR]: Job 'Version &amp; Libraries' finished with 26 failure(s)! (took 0:01:06.362) How do you handle uneven tiles while rendering a tile map? Here is what I want to do with my tile map that I am unsure of. As you can see the top walls are way larger then the bottom and side ones (this is also an issue with my corners which are odd shapes [more like an L then a square] as well as larger then the 40x40px that my current tiles are).    I have also attached the tile sheet I am using for the tiles to show you what the corners and tops look like compared to the rest of the tiles.  What I’m thinking is I might be able to just draw them using the same array I have if I use the tiles width and height instead of a set WxH? I dont know how well this will work, but were the blocks that will have different values will be blocks the player/NPCs can’t step on then it may not be an issue, again I’m not even sure if that is a viable solution.  My code in case you want to see how I'm currently handling it:  (pastebin) (edit:im not handling it, meant how I'm currently doing the map)  tl;dr - how can I take take my 2d looking tile map and change it to have different size tiles? or is there a better way to do what I am trying to do? Is there a name of a method that I should be looking for while googling? Profile Bug - Reputation Summary Not Displaying All Lines Can my child attend a private school whilst I'm on USA ESTA? I am British, currently staying in the USA for 6 weeks on an ESTA Visa Waiver. I am living with a local family and whilst here my child (9 years old) has been attending a private (non-state) school with the children of the local family.  Today somebody told me that by having my child attend a private school I may be in violation of the terms of the ESTA Visa Waiver.  I have found nothing about this at   Where can I find official documentation / online advice about this? Remote Desktop Settings Missing I'm trying to setup remote connection to my Windows 10 machine. During the setup I noticed that my installation is missing some settings all the tutorials have. Can anyone tell me why I'm stupid and what I should do? Below you can find a screenshot of what I'm talking about. The first image is how it should be. The second picture is a screenshot on my machine.      Edit: After popular request, my windows version: