All Questions
3,438
questions
-3
votes
0
answers
45
views
PHP login code will not proceed past $result = mysqli_query($conn, $sql); [closed]
im trying to create a login page for my website and I am trying to just get the function to work but the code wont make it any further than $result = mysqli_query($conn, $sql); and i dont understand ...
0
votes
0
answers
80
views
HTML & PHP page loading becomes slow for 3 while loops [closed]
The loading time of the page is very very long, and the small sections is coming one by one. It is because I am using 3 WHILE loops. Is there any other way so that I can reduce the loading time ?
My ...
0
votes
3
answers
68
views
how to make cells in <td> tag
I have a table like this :
No
Name Product
Type
Num of Units
1
ADA
B112
3 Pcs
2
ADA
B253
1 Pcs
3
ADA
K23
6 Pcs
4
DUZK
l1
10 Pcs
5
DUZK
l5
10 Pcs
6
Naro
NX
1 Pcs
I have this SQL :
$query = &...
0
votes
0
answers
20
views
Only my first SQL statement is working, the following statements appear to be broken [duplicate]
I am a student creating a dynamic website for a school project and I'm attempting to implement a checkout button which selects all items from the basket and inserts each of them into a new order. ...
0
votes
0
answers
41
views
Using Ajax for Labels
I am working on a website page that displays and loads up the menu details once the user clicks on a label by using ajax but it seems that it is not working, I am new to ajax if anyone could review my ...
-2
votes
1
answer
54
views
How can I get HTML/PHP to just print the data from my SQL database without all the Array Jargon
I'm currently learning how to use PHP and SQL in tandem. I'm trying to use PHP to display data from my database straight onto my website. I know it's probably rudamentary, but I have scoured the ...
0
votes
1
answer
29
views
Laravel Searchbar Function Returns Undefined Key
My laravel searchbar is returning Undefined Key. It is returning Undefined Key: 'Search' Here is the controller function:
public function search() {
$search = $_GET['search'];
$...
0
votes
0
answers
34
views
Filter by Hashtag Search Button
i am trying to allow users to filter comments by the hashtags used in them but i am very new to php so do not understand how to link them together (the search button in my html and search in my php)
...
-2
votes
1
answer
106
views
Uncaught PDOException: SQLSTATE[21S01]: Insert value list does not match column list [duplicate]
So i've tried for the past hours to make sense of this Exception but it keeps saying the insert value list doesn't match column list.
This is the code for my php:
function insert_data($humidity, $...
-2
votes
1
answer
101
views
Unable to get row values along with dropdown list [duplicate]
<thead>
<tr>
<th>User ID</th>
<th>User Name</th>
<th>Designation</th>
<th>M a r k A t t e n d a n c e</th>
</tr>
&...
0
votes
0
answers
37
views
Total rating and average rating star showing wrong [duplicate]
I am trying to learn by doing some projects, this it helps me to learn better but I got stuck in between I am trying to display Average rating and total rating and Total reviews but it is not show ...
-1
votes
1
answer
76
views
how to write a line breaker for sql data in html
I want to show the data which is stored in sql column like a package details of a tour. when i am calling that column it's displaying details but it's not showing in clean and neat way. It's ...
0
votes
1
answer
36
views
I am working on an inventory program (web based) for my local gameshop. Trying to create an update page. Values are not carrying over
I have the first page that displays current inventory. Works fine.
I have the second page that displays items that match the SKU entered on the first page.
If I select the first one, values for ...
0
votes
0
answers
23
views
FILTER_VALIDATE_EMAIL works for fake email but not an actual email [duplicate]
I write a fake email like name.fakegmail.com and it allows the email but i write my actual email and it's invalid. Any ideas of why this could be happening
function invalidEmail(string $email): bool
{
...
-1
votes
1
answer
31
views
What is wrong with my sql requesting query? [duplicate]
I try to build my website with sql requests but when I try to make some request it gives me an error. I am a newbie in web, so I can't say what is going on. Can you help me?
<!DOCTYPE html>
<...
0
votes
1
answer
48
views
if (isset($_POST['UpdateBtn'])){ } to stored my input in variable and call the function but when I clink the button name(UpdateBtn) nothing happened
<?php
if (isset($_GET['trn']) && $_GET['trn']=='UPDATE'){
echo '<button type="submit" class="btn btn-primary addOrder" name="UpdateBtn">Update list</...
-4
votes
1
answer
88
views
How can I check if user-entered email is already saved in my database before submitting the form?
I want to check whether the e-mail entered by the user in the form has already been saved in the database. I got help from Chatgpt, but I still couldn't do it, it runs the form completely without ...
0
votes
1
answer
35
views
How do I transform my <img> tag from javascript to actual picture in php?
I'm making a chat in html with php and I want my users profile pictures next to their message. I fetch the text, name and img tag of the profile picture from a sql table but when I create a div with ...
0
votes
1
answer
84
views
How to run 2 sql queries in php to different table to make dropdown lists in html form?
Trying to make a user input form in html where the user select input is based on drop down lists. The first drop down list is made in php from an sql query to one table and the second drop down list ...
0
votes
1
answer
30
views
Updating a task on my website deletes a picture that the item contains - how do I fix this?
PHP:
<?php
require "../konekcija/konekcija.php";
require "../modeli/zadatak.php";
require "../modeli/kategorija.php";
session_start();
if (!isset($_SESSION["...
-1
votes
1
answer
134
views
How to import database sql/csv file using an html button?
How can I import database file using an html button?
I tried creating an upload button and tried to upload a imported sql file from database but the data don't go to the database
<?php
require &...
0
votes
0
answers
35
views
Failed to get sum of a specific row in php [duplicate]
Failed to get total of students in a specific class from mysqli
Am trying to get the sum of students in a specific class from table. I have a code that gets duplicated rows so I want to count those ...
0
votes
1
answer
91
views
combining multiple query results into one and I have different column name and displaying in HTML table
I have a table which keeps the record for letter send by different department to different region(A,B,C) in Hindi or English language as given in the table.
I want to count the number of letter send ...
0
votes
2
answers
130
views
Convert HTML Code with quotation marks to string for SQL insertion
Let's take this sample HTML:
<div class="card custom-card mt-3">
<div class="card-body" id="default">
<div class="row">...
-1
votes
1
answer
59
views
Search value in database with html and php
I just want to add search system for my website
My PHP Code:
<?php
$button = $_GET ['submit'];
$search = $_GET ['search'];
//connect db
$con=mysqli_connect("localhost","root",&...
1
vote
1
answer
43
views
How to trigger form submission with button outside the form with form being created dynamicaly based on selection from a dropdown menu?
So I have a basic form with three input fields and a drop down menu that dynamically creates three diff forms. A button in the navbar "Add Product" Without the drop down menu the data is ...
1
vote
0
answers
63
views
Saving meta box data from selected option's value in database is not working
I have added a organizer input filed using "select and option" tag, screenshot - https://prnt.sc/DtiJr5W178_g
Here is my full code -
// Callback function for Metabox
function ...
-2
votes
1
answer
470
views
Create a sort by function in HTML that allows you to choose Popular, A to Z, Z to A, Low Price to High or High Price to Low, mostly done [duplicate]
I am trying to create a sort by function on my webpage that can allow a set of products stored in an SQL Database, to be sorted by some different options as shown in the title. I have created the ...
-3
votes
1
answer
77
views
How to UPDATE table without WHERE clause in php? [closed]
I would like to update table data on user input without a where clause. I tried using the code below, but it shows "500 Internal server error"
form code (test1.php):
<html>
<form ...
0
votes
0
answers
57
views
How do i print a specific row based on id number?
So when i click the link ''What are SMTP, IMAP etc'' it should only show the article about SMTP but instead shows both articles. How do i show each article to their own titles?
right-column:
<div ...
-1
votes
1
answer
546
views
Query the parent table from child table in laravel
I don't know if the term or title is right but here is what i want to achieve.
I want to get the data of the parent from child table:
lets say Location hasmany Store, and Store hasmany Products
My ...
-4
votes
1
answer
60
views
How to build a family tree with colspan in PHP
I have question about looping out a family tree in PHP. I want the structure to be like this:
See picture
I have truble presenting the data in this way. This is my code:
$start_person = $_GET['search']...
-3
votes
1
answer
70
views
Little problem with display data from local server in html table with php and sql
Today I have a little problem, with basic and maybe funny thing. Today I wanted make table with data from sql server. For that I use Xampp for that and maybe is verry common choose for that. The ...
0
votes
0
answers
45
views
Connecting form that contains foreign keys to mysql database using php
I am begginer in php programming and Im tying to create an electronic medical reords system as a website where the admin registers patients and doctors and they are only able to login with the ...
0
votes
1
answer
51
views
Inserting data into mysql database using php in an html form
Please help out. I have an html form with meant to be submitted to mysql database. I have written the html and the php script for inserting data but it does not insert data into mysql and it throws an ...
-2
votes
1
answer
63
views
How to save a value ($title) from Foreach loop (SQL,PHP) to another page? [closed]
Page1:
View all movies as linked items.
<?php
session_start();
require_once 'db_connectie.php';
function alleFilms() {
$db = maakVerbinding();
$data = $db->query('...
1
vote
1
answer
52
views
How to SELECT SQL data using the results from a previous SELECT
Lets guess I have 3 tables:
Table a where I have a name and email
Table b where I have a text and user (as a reference to email from table a)
Table c where I have follower and following (both ...
0
votes
0
answers
100
views
Need help calling for a variable with my program that uses a qr scanner with php and js
I need to be able to call the id that is stored in the qr, but i dont know how to call it, i´m sorry for the horrible code its my first proyect.
<html>
<body>
<?php
function ...
0
votes
1
answer
39
views
Aligning data in a table according to each characteristics in php
I get data from a mssql database that I want to display in a table.
The table has three categories:
ORDER NUMBER
PAYMENT STATUS
ORDER STATUS
The problem is as follows:
I would like to align my order ...
-1
votes
1
answer
44
views
PHP How to take specific VAR from one php and place it in another severals php files into $sql value
I recently started with MySQL and it's my first time coding in php. So I hope you can help me:
I have a few php files like insert.php, update.php, delete.php etc. and in each of them is the same name ...
0
votes
2
answers
108
views
Doing PHP word processing
I have retrieved data from a MSSQL server table.
I was able to display them thanks to a query.
I would like to be able to modify these data without touching the table
For example the values which are ...
-1
votes
1
answer
46
views
Query String PHP
I'm trying to get the Owner's details by clicking on their name from the table at the bottom.
<html>
<head>
<title>Home</title>
<script src="//ajax....
0
votes
1
answer
37
views
How do I count the amount of times a user was redirected to a page? [duplicate]
I am making a security login where users can create accounts and log in. If the user enters the wrong information, they get redirected to another page where the input borders are red with a warning in ...
0
votes
0
answers
53
views
Deleting items with AJAX is reloading my page
So I have a list of content generated by a table in SQL + an external API. This is how I fetch the content:
for(i=0; i<userLiked.length; i++){
let API_URL = `https://api.rawg.io/api/games/...
0
votes
1
answer
50
views
Using PHP/HTML to combine and display data from two MySQL tables
For context, I have to tables named ho_shifts and ho_incidents. One which includes shifts, which there is always one unique and the other which includes incidents. One shift can have multiple ...
1
vote
1
answer
42
views
Php MySQL: How can I make a button that sorts out files by ID or file type? [closed]
I was planning to put a two or more buttons just right above the table that sorts the shown files by id or filetype in ascending or descending order but i don't know where to start. here's what it ...
-4
votes
1
answer
52
views
Trying to do a search button in php, but doesn't work
I'm trying to create a search button but when I click on it,doesn't work.
Should I implement an Onclick Function? How?
( sorry for the italian )
This one is the index.php page where i create the ...
1
vote
1
answer
3k
views
Maatwebsite Excel with Laravel 9 and PHP 8
I installed Maatwebsite with Laravel 9 and PHP 8 using this command composer require maatwebsite/excel:* . Then I got this notice at the end of the installation:
I then register it in the config/app....
0
votes
2
answers
57
views
How Can I show array content inside the body of html
This is my custom user registration form WordPress site, actually, this is my first custom development, and here all the data passes the DB my problem is I need to show my error message inside the ...
1
vote
0
answers
31
views
having 2 problems with my php code im trying to do a link between php, html and sql and i cant get the alter button to work without some PDO error
This is my main code without the conn.php
im having problems to do a button that alter the current register
on the sql
the html boxes are always with the
Warning: Undefined variable $row in
C:\xampp\...