הערוץ של קבוצת תכנות ועיצוב ובניית אתרים ו- QA ו- אבטחת מידע ו-
123 subscribers
14 photos
8 links
בערוץ ירוכזו שאלות ידע ותרגילים שפורסמו בקבוצה
Download Telegram
קטע קוד עבור שאלה מס' 36 ב- PHP
<?php

if(isset($_GET['id']) && ctype_digit($_GET['id'])){
$id = $_GET['id'];
} else{
header('location: select.php');
}

$db = new mysqli(
'localhost',
'user1',
'password1',
'php');

$sql = "DELETE FROM users WHERE id = $id";
$db->query($sql);
echo'User deleted';

?>

#MySQL_PHP
שאלה מס' 37 ב- PHP
Which of the following is used to declare a constant?
Anonymous Quiz
38%
define
50%
const
0%
constant
13%
all answers right
שאלה מס' 38 ב- PHP
What is the easiest way to iterate over the data MySQL's query() method returns when a SELECT statement is sent to the database?
Anonymous Quiz
64%
Use a foreach loop
0%
Convert the return value in an array
18%
Call the fetch_all_data() method
18%
use a for loop
קטע קוד עבור שאלה מס' 43 ב-PHP
<?php
readfile('header.tmpl.html');
?>
<ul>
<?php
readfile( 'config.inc.php)';


$db = new mysqli(MYSQL_HOST,MYSQL_USER,MYSQL_PASSWORD,MYSQL_DATABASE);
$sql = 'SELECT * FROM users';
$result = $db->query($sql);

foreach ($result as $row) {
printf(
'<li><span style="color: %s">%s (%s)</span>
<a href="update.php?id=%s">update</a>
<a href="delete.php?id=%s">delete</a>
</li>',
htmlspecialchars($row['color'], ENT_QUOTES),
htmlspecialchars($row['name'], ENT_QUOTES),
htmlspecialchars($row['gender'], ENT_QUOTES),
htmlspecialchars($row['id'], ENT_QUOTES),
htmlspecialchars($row['id'], ENT_QUOTES)
);
}

$db->close();
?>
</ul>
<?php
readfile('footer.tmpl.html');
?>
שאלה מס' 9 ב- programming term
Which languages are faster, Compiled languages or interpreted languages ?
Anonymous Quiz
75%
Compiled languages.
21%
interpreted languages.
4%
All answers right.
0%
All answers incorrect.
קטע קוד עבור שאלה מס' 48 ב- PHP
<?php 

$y =20;

if($y == 20){

const X = 30;
}
echo X;
שאלה מס' 48 ב- PHP
What should be the output of the above code snippet?
Anonymous Quiz
50%
30
0%
20
42%
Parse error.
8%
All answers incorrect.
שאלה מס' 49 ב- PHP
בשימוש ב- xor operator כאשר מצויין ש- true xor true מה הערך שיוחזר
Anonymous Quiz
47%
true
53%
false
קטע קוד עבור שאלה מס' 50 ב- PHP
<?php
$a = 8;
$b =8;
$c = 17;
$d = 26;

if(($a == $b) xor( $d > $c )){
echo 'true';
} else{
echo 'false';
}
שאלה מס' 50 ב- PHP
What should be the output in code snnipet that display abovw?
Anonymous Quiz
46%
true
54%
false