I need to insert some data in a single row of the database, the way I am doing it creates 2 rows and I only want this data to be entered in a single row. I can’t find a way to insert the data without creating 2 rows, My question is how can I insert this data into a single
Tag: database
Ajax request to php with empty POST data
I am new to javascript and I have problem with an ajax POST to php. I am trying tosend javascript variables to php via an ajax POST but it doesn’t work. The ajax post is sent but it sends empty POST. I got alert “Error occured ! 202” when trying to save data to bdd. Thanks in advance for helping
issue while deleting row in database by php
Hello I have a table in my database called files and I want to delete a row by its id but whenever I run the code I get the response “Successfully Deleted” but it does not delete the row. …
How to insert data from one table to another in laravel?
I have two tables, visitors and in. visitors contains columns, Name, Number, Purpose, and Datetime. in contains Name, Number, and InTime. I want to fetch all the values from the visitors table into in. I have tried copying the data from visitors to in, however, if I add new rows into the visitors table, those new rows won’t be reflected
Read first record of array instead of first character in Laravel
I’m using Laravel 8 . I’ve saved some array in my database and when I try to read those arrays I just get a single character of it. For example the array in database is [“one”, “two”] and when i write it will just show ‘[‘ instead of ‘one’ in my migration file i did this : and also in
PHP inserting value only once
I am trying to add categories in a database. Things is the script is reading the categories from a product list, therefore there are duplicate values as it’d be like reading PRODUCT NAME – DETAIL 1 – DETAIL 2 – CATEGORY Rinse and repeat. I have my code down and the insert works but it stops at the first product’s
How to upload picture when register in laravel?
I’m trying to upload an image in laravel default user registration. I’m using laravel ui package. Here is create method in RegisterController I’m getting this error Undefined variable: image” Answer In the User model:
Query database for last modified date
I am trying to query my Wordpress server to echo the date of the last modified post. In this case the database name is local and I am checking the posts table. My current code is close to what I need, it will display the date and time as Y-m-d H:i (2021-01-13 12:18) How do remove the time and display
How to Show Data After Login in Laravel
After successfully login from auth, I wan to show the data from database. But I got an error like this. Undefined variable: barangs (View: C:xampp7htdocsexample-appresourcesviewsbarang.blade….
PHP: looking up values in DB and converting before inserting data
This might be easier to do with javascript but but I happen to be restricted solely to MySQL, PHP, and Apache (as well as HTML and CSS obviously) for this project, and I’m not good at PHP I’ve basically finished the whole thing but came a cross a small problem. The user creates a sport event and to do so