fix
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
if(isset($_POST['passed'])){
|
if(isset($_POST['passed'])){
|
||||||
$tabla = $kapcsolat->readAll($kapcsolat->getDBC(), "comics");
|
$tabla = $kapcsolat->readAll($kapcsolat->getDBC(), "comics");
|
||||||
print_r($tabla);
|
//print_r($tabla);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
$adatok[$key] = $value;
|
$adatok[$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print_r($adatok);
|
//print_r($adatok);
|
||||||
$kapcsolat->insert($kapcsolat->getDBC(), 'comics', $adatok);
|
$kapcsolat->insert($kapcsolat->getDBC(), 'comics', $adatok);
|
||||||
}
|
}
|
||||||
} catch (Exception) {
|
} catch (Exception) {
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div align="right">
|
<div align="right">
|
||||||
<form method="post" action="index.php">
|
<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>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class Kapcsolat{
|
|||||||
private $password = '';
|
private $password = '';
|
||||||
private $dbname = 'kepregeny';
|
private $dbname = 'kepregeny';
|
||||||
private $dbc;
|
private $dbc;
|
||||||
//konstruktor
|
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
try {
|
try {
|
||||||
$datasourcename = "mysql:host=$this->host;dbname=$this->dbname";
|
$datasourcename = "mysql:host=$this->host;dbname=$this->dbname";
|
||||||
@@ -23,8 +23,7 @@ class Kapcsolat{
|
|||||||
public function getDBC(){
|
public function getDBC(){
|
||||||
return $this->dbc;
|
return $this->dbc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function readAll($dbc, $table) {
|
public function readAll($dbc, $table) {
|
||||||
$sql = "SELECT * FROM $table;";
|
$sql = "SELECT * FROM $table;";
|
||||||
$utasitas = $dbc->prepare($sql);
|
$utasitas = $dbc->prepare($sql);
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ table, th, td{
|
|||||||
button, .gomb{
|
button, .gomb{
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
width: 6%;
|
width: 6%;
|
||||||
|
padding-right: 6%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cim{
|
.cim{
|
||||||
@@ -56,4 +57,4 @@ button, .gomb{
|
|||||||
|
|
||||||
.sor{
|
.sor{
|
||||||
margin-bottom: 1.5%;
|
margin-bottom: 1.5%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user