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

MySQL and phMyAdmin

I'm new to this website and using Mysql and phpMyAdmin. I need help with one of my table and I would really appreciate it. So, I created a table that has an Integer column I want to be able to…

VIEW QUESTION
Back To Top
Search