[Solved] A form to mysql query

Something like this: mi_page.php <?php if(isset($_POST[‘ebur’])) { $ebur = mysql_real_escape_string($_POST[‘ebur’]); $con=mysqli_connect(“ipaddress”,”user”,”passw”,”account”); // Check connection if (mysqli_connect_errno()) { echo “Falha ao receber moedas, informa o administrador com o codigo 445ebmds. ” . mysqli_connect_error(); } mysqli_query($con,”UPDATE account SET coins=”2000″ WHERE mi_field_on_the_table_account=”$ebur””); mysqli_close($con); } ?> <form method=”post” action =”mi_page.php”> <textarea rows=”4″ cols=”50″ id=”ebur” name=”ebur”> </textarea> <input type=”submit” value=”Enviar” … Read more

[Solved] Random alphanumeric

@echo off setlocal enableextensions enabledelayedexpansion rem Define alphabet set “alphabet=a b c d f g h i j k l m n p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9” rem Create an “array” with the elements of the alphabet set “size=0” … Read more

[Solved] PHP debuging printing into command line [closed]

You can write the variable into a file and “tail” that file on terminal. function writelog($msg) { file_put_contents(FILE_PATH,$msg); } You can also use error_log function instead of file_put_content. But i am not sure whether its an error message or not. On terminal just run tail -f FILE_PATH P.S. FILE_PATH is absoulte path of the file … Read more

[Solved] If function in drop down list using JavaScript [closed]

function myFunction() { var internetElem = document.getElementById(“internet”); var internet = internetElem.options[internetElem.selectedIndex].value; var computerElem = document.getElementById(“computer”); var computer= internetElem.options[internetElem.selectedIndex].value; if (internet==”no”||computer==”yes”) { x=”check your cable is not cut or loose”; } else if (internet==”no”||computer==”yes”) { x=”connection problem”; } else { x=”other problems….”; } document.getElementById(“Solution”).innerHTML=x; } You need something like above. Just find an element by its … Read more

[Solved] R create a matrix of occurence [closed]

Ok, still not perfectly clear, but I THINK that presence is now an adjacency matrix, where the columns represent users and the rows represent events, so presence[i,j] indicates that user i attended event j. If I’m interpreting it correctly then counts seems to be the co-occurrence matrix, correct? count[i,j] should record the number of events … Read more

[Solved] How do I store the data which is passed though the browser link in a mySQL database? [closed]

you are actually looking for _GET[‘message3’]variable.. do something like that $message = _GET[‘message3’] ; if(isset($message){ $sql = insert your $message variable in database here run the query } etc.. and you are done I assume that you are learning over your localhost and you got the file Sent.jsp solved How do I store the data … Read more

[Solved] How to defined a variable on PHP? [closed]

Clearly from the error can be read that the current index you are using for the array doesn’t exist. $up_fonts[$font][‘style’] is not set. You haven’t defined your array enough. Check if the value exist with if (isset($up_fonts[$font][‘style’])): $stylesheet = $up_fonts[$font][‘style’]; endif; 2 solved How to defined a variable on PHP? [closed]

[Solved] Convert from a string to datetime

Try this: var input = “2004/01/02 12:01:03”; DateTime aDate; DateTime.TryParse(input, out aDate); string output = aDate.ToString(“yyyyMMddHHmmss”); 1 solved Convert from a string to datetime

[Solved] browser only downloads 10 images at once (JS) [closed]

I’m not sure what you are trying to do, but if there is a restriction on the number of simultaneous downloads, why not try setting a timeout so they don’t fire at the same time? transferFiles(){ this.checkMark = true let i = 0 this.finalImages.forEach((image) =>{ setTimeout(function(){ saveAs(image, ‘imagem’+(i+1)); }, i++ * 500); }); } 3 … Read more

[Solved] How to learn magento [closed]

The best way to learn Magento is to solve issues as you go along. Maybe a good place to start is this: http://www.magentocommerce.com/knowledge-base. Also the guys at siteground did a nice thing with this: http://www.siteground.com/tutorials/magento/ Other than this, maybe you should actually start working on a task and when you hit a brick wall (this … Read more

[Solved] Find an element in a list of tuples in python [closed]

You can use in to test membership: >>> for attr in attrs: … if (‘href’, ‘http://fls-na.amazon.com’) in attr: … print attr … [(‘rel’, ‘dns-prefetch’), (‘href’, ‘http://fls-na.amazon.com’)] solved Find an element in a list of tuples in python [closed]