LBT3: begin project
This commit is contained in:
@@ -1,33 +1,38 @@
|
|||||||
# Zweites Jahr
|
# Zweites Jahr
|
||||||
|
|
||||||
|
|
||||||
## Infos
|
## Infos
|
||||||
|
|
||||||
Wichtige Informationen
|
Wichtige Informationen
|
||||||
- Wir eventuell nie aktuell sein.
|
|
||||||
- Stundenplan - [Link](https://wvss-mannheim.webuntis.com/WebUntis?school=wvss-mannheim#/basic/timetablePublic/class?date=2025-12-08&entityId=2583)
|
- Wir eventuell nie aktuell sein.
|
||||||
|
- Stundenplan - [Link](https://wvss-mannheim.webuntis.com/WebUntis?school=wvss-mannheim#/basic/timetablePublic/class?date=2025-12-08&entityId=2583)
|
||||||
|
|
||||||
|
## 10-12-25 - PHP
|
||||||
|
|
||||||
|
- Unterrichtsprojekt begonnen:
|
||||||
|
- Verbindung zur Datenbank
|
||||||
|
|
||||||
## 9-12-25 - PHP (SQL)
|
## 9-12-25 - PHP (SQL)
|
||||||
|
|
||||||
- Datenbank durch PHP erstellt und Daten hinzufügen
|
- Datenbank durch PHP erstellt und Daten hinzufügen
|
||||||
|
|
||||||
### 21-11-25 - PHP
|
### 21-11-25 - PHP
|
||||||
|
|
||||||
- Aufgabe von gestern Kontroliert + Kommentare hinzugefügt
|
- Aufgabe von gestern Kontroliert + Kommentare hinzugefügt
|
||||||
- XML von AP1 Aufgabe
|
- XML von AP1 Aufgabe
|
||||||
|
|
||||||
### 20-11-25 - PHP
|
### 20-11-25 - PHP
|
||||||
|
|
||||||
- GETTER in PHP
|
- GETTER in PHP
|
||||||
- Übung zu OOP
|
- Übung zu OOP
|
||||||
|
|
||||||
### 19-11-25 - PHP
|
### 19-11-25 - PHP
|
||||||
|
|
||||||
- Übung Datei lesen/schreiben (Log Access)
|
- Übung Datei lesen/schreiben (Log Access)
|
||||||
|
|
||||||
|
|
||||||
### 18-11-25 - PHP
|
### 18-11-25 - PHP
|
||||||
|
|
||||||
- Datein lesen
|
- Datein lesen
|
||||||
|
|
||||||
### Davor
|
### Davor
|
||||||
|
|
||||||
|
|||||||
9
Zweites Jahr/unterrichts_projekt/db_connection_data.php
Normal file
9
Zweites Jahr/unterrichts_projekt/db_connection_data.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
// db_connection_data.php
|
||||||
|
|
||||||
|
|
||||||
|
$db_engine ="mysql";
|
||||||
|
$db_name = "E2FI1_2025";
|
||||||
|
$db_host = "localhost";
|
||||||
|
$db_user = "phpmyadmin";
|
||||||
|
$db_password = "server";
|
||||||
20
Zweites Jahr/unterrichts_projekt/db_connection_function.php
Normal file
20
Zweites Jahr/unterrichts_projekt/db_connection_function.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
// db_connection_function.php
|
||||||
|
|
||||||
|
function db_connect(){
|
||||||
|
require_once("db_connection_data.php");
|
||||||
|
// db_server = "mysql:dbname=testdb;host:localhost";
|
||||||
|
$db_server = "$db_engine:dbname=$db_name;host=$db_host";
|
||||||
|
try {
|
||||||
|
$dbh = new PDO ($db_server, $db_user, $db_password);
|
||||||
|
echo "<p>DB Connection succesfull established!</p>";
|
||||||
|
return $dbh;
|
||||||
|
} catch (PDOException $e){
|
||||||
|
echo "Could not connect to DB!<br> ";
|
||||||
|
die("More:".$e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Test:
|
||||||
|
db_connect();
|
||||||
Reference in New Issue
Block a user