This commit is contained in:
2022-06-07 18:31:44 +02:00
parent 8bd4c9ec2b
commit e1bac6594a
4 changed files with 7 additions and 7 deletions

View File

@@ -8,7 +8,7 @@
if(isset($_POST['passed'])){
$tabla = $kapcsolat->readAll($kapcsolat->getDBC(), "comics");
print_r($tabla);
//print_r($tabla);
}
@@ -23,7 +23,7 @@
$adatok[$key] = $value;
}
}
print_r($adatok);
//print_r($adatok);
$kapcsolat->insert($kapcsolat->getDBC(), 'comics', $adatok);
}
} catch (Exception) {
@@ -142,7 +142,7 @@
</div>
<div align="right">
<form method="post" action="index.php">
<button type="submit" name="passed" id="passed">Lekérdézés</button>
<button type="submit" name="passed" id="passed">Lekérdézés </button>
</form>
</div>
</div>

View File

@@ -7,7 +7,7 @@ class Kapcsolat{
private $password = '';
private $dbname = 'kepregeny';
private $dbc;
//konstruktor
public function __construct(){
try {
$datasourcename = "mysql:host=$this->host;dbname=$this->dbname";
@@ -24,7 +24,6 @@ class Kapcsolat{
return $this->dbc;
}
public function readAll($dbc, $table) {
$sql = "SELECT * FROM $table;";
$utasitas = $dbc->prepare($sql);

View File

View File

@@ -32,6 +32,7 @@ table, th, td{
button, .gomb{
border-radius: 5px;
width: 6%;
padding-right: 6%;
}
.cim{