[Solved] about mysql query in php [closed]

Your code should work. It is better to have some protection against SQL injection as below. I have changed addslashes to mysql_real_escape_string. So now it should be alright. $name1 = mysql_real_escape_string($_POST[‘name1’]); $name2 = mysql_real_escape_string($_POST[‘name2’]); $name3 = mysql_real_escape_string($_POST[‘name3’]); mysql_query(“INSERT INTO tb_people (name) VALUES (‘$name1’), (‘$name2’), (‘$name3’);”); 5 solved about mysql query in php [closed]

[Solved] Tournament Program [closed]

The error you have comes up in your method of printing out the results: for i in range(len(teams)): print(team[i],team[i+1]) First of all, you have team instead of teams in the print statement, which is actually the string where you were storing user input, and should be ‘-1′ by the time you’re printing scores. You’re getting … Read more

[Solved] Count the number of current posts in Div

Your posts are in ul list. you need to count the length of the li‘s under this ul#postlist [assuming that each li is a post] <ul data-filter=”true” data-filter-placeholder=”Search blog posts…” id=”postlist”> </ul><!– content –> Change your $(‘#postlist’) var currentPost = $(‘#postlist’); with var currentPost = $(‘#postlist li’); $(‘#postlist li’) is what you are looking for, … Read more

[Solved] shift each letter of words by value

You need to do the assignment yourself (or there is no point in learning to program) and if you don’t understand the question, you should ask your teacher for clarification. That said, shifting is quite simple in principle. You can do it by hand. If you have a letter, say A, shifting it by 1 … Read more

[Solved] Counting amount in Java loop [closed]

You need to declare a variable to hold the sum: int f, sum = 0; for (int k = 1; k <= 6 ; k++){ System.out.println(“Type ” + k +”. number”); f = userInput.nextInt(); sum += f; } solved Counting amount in Java loop [closed]

[Solved] Regex scraper challenge [duplicate]

function extract_regex($subject, $regex, $index = 1) { preg_match_all($regex, $subject, $matches); if (count($matches[$index])) { if (count($matches[$index]) == 1) { return trim($matches[$index][0]); } return $matches[$index]; } return ”; } $out = extract_regex(“<label class=”area”><font class=”bg_info” onmouseover=”land_convert_txt(this,3067)” onmouseout=”tooltip_hide()”>3,067 Sq. Ft.</font></label>”,”/<label class=\’area\’>(.*)<\/label>/i”); echo “<xmp>”. $out . “</xmp>”; 11 solved Regex scraper challenge [duplicate]

[Solved] Unknown php syntax [closed]

It translates to this: <td> <?php if($contact[‘Contact’][‘sex’] == ‘m’): ?> Male <?php else: ?> Female <?php endif ?> </td> But there is really nothing wrong with the line that is actually in your file. 7 solved Unknown php syntax [closed]