7,368 Topics

Member Avatar for
Member Avatar for GermanPsycho

Hey, I'm trying to program a group-request system and now I'm struggling a little bit with the code. Well, I'll try my best to explain what I'm trying to do. ![requests.png](https://static.daniweb.com/attachments/4/c8beed25ef34924bc77f3007728ad5d3.png) I want, that when I click the accept button, ONLY the name from the person next to the accept …

Member Avatar for Dani
0
195
Member Avatar for IbtiSsam

how can i delete notification from the bar notifications without deleting from database like facebook. when i click cross the notification disappear <?php $sql_get1=mysqli_query($connection,"SELECT * FROM message WHERE status=0"); if (mysqli_num_rows($sql_get1)>0) { while ($result=mysqli_fetch_assoc($sql_get1)) { echo '<div class="font-weight-bold">'; echo ' <div class="text-truncate badge-counter">'.$result['name'].'</div>'; echo ' <div class="small text-gray-500 bg-gradient-primary">'.$result['message'].'</div>'; echo …

Member Avatar for rproffitt
0
29
Member Avatar for IbtiSsam

<?php include('connexion.php'); include('security.php'); include('includes/header.php'); include('includes/navbar.php'); ?> <body> <?php if(isset($_POST["approved"])) { $id_location=$_POST['id_location']; $sql="UPDATE location SET etat = 'Approved' WHERE id_location = '$id_location'"; mysqli_query($connection,$sql); } if(isset($_POST["rejected"])) { $id_location=$_POST['id_location']; $sql="UPDATE location SET etat='Rejected' WHERE id_location = '$id_location'"; mysqli_query($connection,$sql); } ?> <div class="container-fluid"> <div class="card shadow mb-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary"> …

Member Avatar for IbtiSsam
0
376
Member Avatar for Seidu
Member Avatar for scrummy

There is a PHP login code but I don't know how to show the error message when the user types wrong datas into the input fields. I used to have a `echo"Wrong username or password!";` But I want to display a DOM element. I don't know how to make it. …

0
3K
Member Avatar for scrummy

I have a page that list all of the users from mysql database. I put a **delete** button in it so you can delete the profile instantly. But I didn't want to delete the user instantly so I put a code that create a modal box when you click onto …

0
264
Member Avatar for kumi2021

Hi, I am a amateur here. My web developer went awol and I have an issue; my website wont load at all. **Error: PHP Fatal error: Uncaught Error: Call to undefined function mysql_pconnect** <?php if(!session_id() || session_id() == '') session_start(); # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" //$hostname_quantum = "xxxxx.co.za"; //$hostname_quantum …

Member Avatar for pritaeas
0
804
Member Avatar for IbtiSsam

**please help me** Warning: Cannot modify header information - headers already sent in C:\xampp\htdocs\gauto-preview\gauto-preview\login(1).php on line 19 <?php ob_start(); session_start(); require_once('connexion.php'); error_reporting(E_ALL | E_WARNING | E_NOTICE); ini_set('display_errors', TRUE); if(isset($_POST['login'])){ $username=$_POST['username']; $motpasse=$_POST['motpasse']; if($username&&$motpasse){ $query="SELECT*from user where username='$username' AND motpasse='$motpasse'"; $query_run=mysqli_query($conn,$query); $rep = mysqli_fetch_assoc($query_run); if($rep!=''){ $_SESSION['id_user'] = $rep['id_user'];} $row=mysqli_num_rows($query_run); if($row==1){ flush(); header('Location: …

Member Avatar for rproffitt
0
98
Member Avatar for Mannan_3

Hi guys, this is my first post on the forum and I am in need of some help. I am a PHP beginner and I have been trying to come up with a solution to my issue for a while now. I am trying to make a system where a …

Member Avatar for rproffitt
0
570
Member Avatar for soniyabis

Hi All Can anyone help me, if user inactivity and update my datbase row automaticlly ( I mean time set if user inactivity or browser close ) Before login $sql = "UPDATE register set logged_in='1' WHERE (matri_id='" . $username . "' OR email='" . $username . "')"; $DatabaseCo->dbLink->query($sql); After login …

Member Avatar for AndrisP
0
132
Member Avatar for Ravindra_9
Member Avatar for madantwo

foreach ($_SESSION["cart_item"] as $item ){ $name=$item['name']; $a=$item['p1']; $b=$item['img1']; $pname=$item['pname']; $email=$item['email']; $size=$_POST['sizea']; $ddate=date('Y/m/d'); $p="insert into orders(order_id,ddate,customer,product,pname,p_img,size,email) values('$last','$ddate','$name','$a','$pname','$b','$size','$email')"; mysql_query($p) or die(mysql_error()); } <select name="sizea[]" id="planida" > <option>Select Plan</option> <option value="XL">XL</option> <option value="M" >M</option> </select> Output: Size: Array // not work

Member Avatar for madantwo
0
86
Member Avatar for TechnoJarvis

i want to store 2 column value in multi rows like if i paste a value in textarea like (12.50,25.100,5.30,78.500,98.2000) and this value insert in my table with 2 column like col1 col2 12 50 25 100 05 30 78 500 98 2000 so sir can you please help

0
41
Member Avatar for feehoy

I have a snippet that inserts data in a row in a MySql database. If that data already exists the existing row should be updated. In my case, I continue to get insert only. What is wrong with this snippet? $page = basename($_SERVER['SCRIPT_NAME']); $ip_address = $_SERVER['REMOTE_ADDR']; include_once("includes/connection.php"); $sql=mysqli_query($con, "SELECT visits …

Member Avatar for feehoy
0
112
Member Avatar for domandidomandi

I am new for PHP. I tried to display text box value based on drop down selection. it seems code working. no error display here. But when i change the drop down, text box value shows empty. Even print the data it will display only null. HTML:- <select name="cat" id="cat"> …

0
58
Member Avatar for showman13

Hi, This might be a simple question, but I have an affiliate site that I want to drive traffic to, and the traffic will be coming from various sources. All I want to know is that I got the traffic count that is being contracted for from each source... My …

Member Avatar for showman13
0
449
Member Avatar for cosmo13

> Hey there! I don't know why "Your Password is Incorrect!" is printed before I fillin the form. I've started learning php two weeks ago <!DOCTYPE html> <html> <head> </head> <body> <form action = "" method="POST"> <label id="first"> Name: </label><br/> <input type="text" name="username" placeholder= "Name" required><br/> <label id="first">Password: </label><br/> <input …

Member Avatar for Biiim
0
163
Member Avatar for showman13

Using PHP / MySQL This is a sort of long explanation, but trying to provide all the information the first time. Hopefully someone can tell me what I’m missing or doing wrong, without too much criticism. I am trying to create a FUNCTION that I can use to retrieve a …

Member Avatar for Dani
1
610
Member Avatar for darkbox

Good evening everyone, I created this file to be able to print the data from the database on the screen. Everything ok but all the data contained in the database appear on the same line. I would like them to print like this: nome email titolo dataeora msg nome email …

Member Avatar for darkbox
0
81
Member Avatar for 3IA13_

Dear Friends, Help me to fix this.. Error Message : mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in Code is, <?php class Login { public function login_proses($u, $p){ include ('koneksi.php'); $pass = base64_encode($p); $_mysqli->query("START TRANSACTION;"); $cek_login = $_mysqli->query("SELECT * FROM penduduk, hak_akses, hak_akses_user WHERE penduduk.nik = hak_akses_user.nik AND …

Member Avatar for pritaeas
0
64
Member Avatar for theplayer

I have an error with the registration form, when someone registers or connects it gives me : Warning: mysql_num_rows() expects parameter 1 to be resource, null given in \public_html\include\global.php on line 37 Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in \public_html\include\global.php on line 38 Warning: Cannot modify …

Member Avatar for Dani
0
117
Member Avatar for rchawdhari

create table dummy{id int ,invoice int } insert into dummy values(191,10),(192,11),(193,0); I have to update 193 with invoice 13 but i want to fetch max invoice and then increment invoice by 1 for 193 . i had tried update dummy set invoice=(select max(invoice) from dummy)+1 where id=191. It wont work …

Member Avatar for M_41
0
266
Member Avatar for obedz

Rick is really fond of fruit juices, but he is bored of their traditional flavours. Therefore, he has decided to mix as many of them as possible to obtain something entirely new as a result. He has N glasses, numbered from 0 to N-1, each containing a different kind of …

Member Avatar for Chrisphine
0
3K
Member Avatar for Vitor_2

This is the scenario: **User A:** Access the website and choose a questionnaire. The questionnaires are separated on different pages in the same domain, for example: **Home:** "surveys.com" **Questionnaires:** "surveys.com/type1" "surveys.com/type2" After choosing one, he (**User A**) puts the following information: **1** = Recipient's email **2** = His email And …

Member Avatar for john_111
0
106
Member Avatar for Xozz

Hi. I'm trying to set up an AMP system on my machine. It's called UwAmp. Anybody there to tell me how to setup the MySQL in this thing? Thank you

Member Avatar for john_111
0
490
Member Avatar for Parker_1

Link in MySQL: https://wahlburgers.com/dorchester Variable loaded: $website = $row["website"]; How can I echo the word "Website" as a hot link to $website ( https://wahlburgers.com/dorchester ) inside an HTML form? This is what I've tried: <input type="text" id="website" name="website" value="<?php echo "<a href= '" . $website . "'>" . "Website" . …

Member Avatar for Jawass
1
191
Member Avatar for darkbox

Good morning, I state that I am a beginner, I kindly need help from you. I made a page containing a form that submits data to a database. Everything works perfectly. I would now need to send the data to my email address at the same time. The form contains …

Member Avatar for darkbox
0
103
Member Avatar for messiahjoseph39

Good day, I am actually a young programmer, who wants to develop a webpage that enables someone to take a practice test. It was given to me as an assignment that determines if I will remain a programmer. I know little about PHP codes but none in Mysql. I came …

Member Avatar for NeighborDave228
0
167
Member Avatar for Deve381

I have 3 radio buttons on my form A , B , C but when i clicked on A radio it shows specific dropdown which get data from database table but by fruitid 1 and when i clicked on B it will show data fruitid 2 as onnword. i need …

Member Avatar for Dani
0
167
Member Avatar for Jesse_21

I am attempting to update my accounts table for the current session ID with the data posted from a form. My first prepare statement is functioning fine and can be seen functioning through the placeholder variables in the form. It is my second prepare statement that doesnt seem to be …

Member Avatar for Dani
0
88

The End.