skip to Main Content

Django – Form is getting submitted but nothing saves in database – Mysql

My form is getting submitted by in phpmyadmin nothing get saved please help. Models.py from django.db import models class Customers(models.Model): first_name=models.CharField(max_length=100) . . . address=models.CharField(max_length=100) mar_stat=models.CharField(max_length=100) class Meta: db_table="customers" Views.py def customerreg(request): if request.method=='POST': if request.POST.get('first_name') and request.POST.get('last_name') and request.POST.get('gender')…

VIEW QUESTION

Attempt to read property "id" on integer – Laravel

I am new in laravel and working on E-Commerce Project. Plz Help me! I am trying to get data from the database but I can't. My function public function add_product_attributes($id) { $attributes = Product::where(['id' => $id])->with('attributes')->first(); $attributes_data = $attributes->toArray(); dd($attributes_data);…

VIEW QUESTION
Back To Top
Search