#32 Insert school data | Student management system in PHP | OOP MVC | Quick programming tutorial

preview_player
Показать описание
in this series, we create a student management system from scratch using PHP in object oriented format and model view controller system.

images used:

source code:

complete playlist:

PHP Object Oriented Programming basics:

more tutorials:
make a social website from scratch:

all crash courses:

code a live chat app in PHP and JavaScript:

make an eCommerce website from template:

convert an HTML template to PHP website:

simple signup and login system & security:

crop images with PHP:

Chart or graph using SVG:

Responsive web design:

clean pretty URLs:

support me on patreon:

my facebook:
Рекомендации по теме
Комментарии
Автор

At 6:48. the $_SESSION['USER']-> school_id, in make_user_id function, is not empty at that time? I do not really understand how the if can work there.. ty for your help!

balazsperak
Автор

I have problem in this i am not getting my user id it shows nothing in my user_id help ASAP

taukeershaikh
Автор

Hello Sir, may you explain well in School Model this function make_user_id in the on this line we can't get user_id but if we modify to isset($_SESSION['USER']) we get the user_id, the question is how are you accessing school_id from this user session ? Thank I will appreciate your feedback

shyakagen
Автор

My linter is screaming at me with the error:
'Dynamic class names are not allowed in compile-time ::class fetch'

at this line in core/model.php:
$this->table = strtolower($this::class) . "s";

Can I safely ignore this, or is it a problem?

devbites
Автор

In school database, when I put date (Type: int) following you. I try to insert it I get errors. But when I change Type: Int to datetime and try to insert again I didn't get errors.

yim_klok
Автор

Im really confuse, can you help me with this sir. I can add school and it is showing in the system but not saving in the database, what should i do? Thank you.

bLUegRAy
Автор

I am trying to add new school to database this was the Fatal error i am getting while adding but data is added into the database page is not redirected and showing this error on the screen

I have noticed one thing While i am running for PC it shows error, on Laptop it is working fine with same code i am using.

echo $query --> insert into schools (school, date, school_id, user_id) values (:school, :date, :school_id, :user_id)


Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error in Stack trace: #0 PDOStatement->fetchAll(5) #1 Database->query('insert into sch...', Array) #2 Model->insert(Array) #3 Schools->add() #4 App->__construct() #5 {main} thrown in on line 31

mvpraveenkumarjonnalagadda
Автор

My URL is "schools/schools" after I click Cancel or Create. Not "schools". Otherwise everything else (database handling, page switching) works well.

synth
Автор

first of all, i have to say that your content is really nice, but why didn't you prevent CSRF ???

Furqanb_
join shbcf.ru