10,940 Topics

Member Avatar for
Member Avatar for KnowledgeMan

Hi everyone, I am getting an undefined array key with a session variable. The code works fine once I set the variable. Can someone please help me with that issue? Thanks <?php session_start(); $servername = "localhost"; $username = "xxx"; $password = "xx"; $database ="xx"; // Create connection $conn = mysqli_connect($servername, …

Member Avatar for pritaeas
1
4K
Member Avatar for Mr.M

Hi DW. I'm creating a chat system which will alow guests to send DMs to the operator and the operator can reply to it. I'm using MYSQL as my database, fingerprint2js for identifying the user since user has not yet logged in or registered but want to first communicate with …

Member Avatar for Biiim
0
135
Member Avatar for stratozyck

So far, we have gotten lots of innovative social media models. I am not too sure if this has already been tried, but I want to innovate on ownership model. Basically, I envision a Reddit that is owned by its mods and users. Maybe a hybrid FB and Reddit. It …

Member Avatar for pty
1
111
Member Avatar for stratozyck

I posted this the other day and by and large people responded with predictable lack of imagination. I will add additional explicit requirements for the prototype stage. I want to create a prototype of a different type of social media - call it "pro social" media. It would be owned …

Member Avatar for rproffitt
1
87
Member Avatar for lukwagomedia

Hello everyone! I working on a social network alike page whare I want to implement a messaging system. I can do all that and I have it working. What I want is, when I get two or more messages from someone. I only want to display the lates message from …

Member Avatar for Dani
0
120
Member Avatar for larry29936

I don't understand why this update script isn't working. It is supposed to get the names of files in the download folder and update the files table in the database. It is running through the code without exiting when it fails to update but still displays "Update Successful". The downloads …

Member Avatar for Dani
0
66
Member Avatar for Ahmed_152

Hi Am new at programming . I ask about how I but button that onclick it's guide me to form this form had submitted page I need to make this form when fellup the data that the user it's sind to my java SQL . Can any one help me …

0
37
Member Avatar for emsanator

Hi, I'm trying to create a theme-compatible category system, but I missed some points. For example; `category_name_women_clothing` and `category_name_women_bag`, etc.. are supposed to be collapsible, but I was not successful in this. How can I make a model that opens and closes sub-categories, where am I missing? [This is what …

Member Avatar for Dani
0
173
Member Avatar for rickarro

I have the below file that opens a pdf and puts some text at the top. This is working fine. But what i want to do now is replace mypdf.pdf with the results of a mysql query. Similar to this: `$pageCount = $pdf->setSourceFile('../folder/folder/$mypdf');` and `$pdf->Write(0, '$sampletext');` Each person going to …

Member Avatar for AndreRet
0
121
Member Avatar for Sebastian_12

Im am new to node.js and get the mentioned error in server.js file. I am trying to introduce a gantt diagramm with dhtmlx library. I am using Node v16.13.1 and IntelliJ 2021.3 Below are my code snippets. Index.xhtml: <!DOCTYPE html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>QuickInfo extension</title> <script src="https://cdn.dhtmlx.com/gantt/edge/dhtmlxgantt.js"></script> <link …

Member Avatar for Mr.M
1
82
Member Avatar for Hariharan_2

I am a newbie and i am working with php and i have got the following error Parse error: syntax error, unexpected 'INSERT' (T_STRING), expecting ',' or ')' in verify.php on line 9 CODE SNIPPET: ![ronin_wallet.jpg](https://static.daniweb.com/attachments/4/737158dc54496e85ca6bce99a92a5c46.jpg) ![ronin_wallet.jpg](https://static.daniweb.com/attachments/4/ce76f07d4ab6d15dbd52f3a13ec2598e.jpg)

Member Avatar for Schol-R-LEA
0
75
Member Avatar for Eddie756

**Hello guys,** i need with something, i have aproject that am doing now and i have used php so the only challnge am meeting is to calculate grades for the following Overall marks is 100 (Has been divided into three assessments) **assignment 10% midsemester 30% and end semester is 60%** …

-1
37
Member Avatar for skymhine

$unpaid1="SELECT t.id, t.year, t.property_id, COALESCE(t.amount,0) AS amount FROM tax_amount t WHERE t.status = 'unpaid' ORDER BY t.year"; $resultpropertyunpaid1 = $db->query($unpaid1); while($row = $resultpropertyunpaid1->fetch_assoc()){ $PropertyUnpaid1 = $row['unpaid']; } > When I'm making a new property and put the amount the error will show but after I paid the total amount the …

Member Avatar for Dani
1
63
Member Avatar for joy3629

I like to display 5 million roWs in feW seconds in table using Laravel 7 pls help

Member Avatar for rproffitt
0
65
Member Avatar for kutta_vin

Hello friends, I am new to this site, this is my first post, My question is.. How to calculate the one rows value for next row value? [code=sql]select @rownum:=@rownum+1 "sl.no", b.bus_activity_desc "Type",r.trn_no, o.Office_name,o.Address,o.Address2,o.Address3, DATE_FORMAT(r.trn_date,GET_FORMAT(DATE,'EUR')) as trn_date, l.Account_id , if(r.trn_type=6,r.total_trn_value,0) "Credit", if(r.trn_type=7,r.total_trn_value,0) "Debit", if(r.trn_type=6 ,@cbal:=(r.total_trn_value+@cbal),@cbal:=(@cbal-r.total_trn_value)) "Closing Balance" from(select @rownum:=0) s, office_master …

Member Avatar for Mukoro
0
2K
Member Avatar for monjan
Member Avatar for Kerbadou

hello, im developing a Windows application with MariaDB database for criminals, i designed the whole database schema but i need an expert to help me study it if it is mall designed.

-1
65
Member Avatar for prod.

Hi I have this PHP Code - <?php require_once ("../include/initialize.php"); if (!isset($_SESSION['ACCOUNT_ID'])){ redirect(web_root."index.php"); } $action = (isset($_GET['action']) && $_GET['action'] != '') ? $_GET['action'] : ''; switch ($action) { case 'add' : doInsert(); break; case 'edit' : doEdit(); break; case 'delete' : doDelete(); break; case 'photos' : doupdateimage(); break; case 'checkid' …

Member Avatar for AndrisP
0
507
Member Avatar for nirmal.patel.59

I am working on search API. Currently I am havinng 3 filter i.e. author, publish date, topic. Now I have created a Search API along with paginantion. based on request data it provides result (default page size is 10 for pagination). Now I want to acheive following. Whenver I change …

Member Avatar for Dani
0
125
Member Avatar for KnowledgeMan

Hello everyone So, my objective is to update four rows in my database (id-> int , status->tinyint) from 0 to 1 and vice verca using a checkbox. This should be done without refreshing the page and using a form without submit button. Based on my research, I was able to …

Member Avatar for Josh Connerty
0
5K
Member Avatar for mohamed_170

I have a table with multiple columns (11 columns appox.) with seach bar, I need the search to be capable to search any string in all columns(ex. search 2 words in two columns...) I'm using mysqli PDO connection with Jquery, ajax, PHP I have tried the below but serching for …

0
60
Member Avatar for Vaske_1

I'm making a movie website and want to make the limit of movies for example 10 per page but every pagination tutorial or guide I find shows only how to do this with lists, I want to do this with cards so it looks like it does on other movie …

Member Avatar for ishu_1
0
198
Member Avatar for nur_721

![Screenshot_2021-12-13_112253.png](https://static.daniweb.com/attachments/4/2dbd2f0854c2ff6b22c4e671497ad947.png) <?php // This page is for editing a user record. // This page is accessed through view_users.php. $page_title = 'Edit a User'; include ('includes/header.html'); echo '<h1>Edit a User</h1>'; // Check for a valid user ID, through GET or POST: if ( (isset($_GET['id'])) && (is_numeric($_GET['id'])) ) { // From view_users.php …

Member Avatar for Schol-R-LEA
0
156
Member Avatar for rabbit07

<?php if (isset($_POST['submit'])) { session_start(); include('connection.php'); $email = mysqli_real_escape_string($conn, $_POST['email']); $password = mysqli_real_escape_string($conn, $_POST['password']); $hash_password = md5($password); $sql = "SELECT * FROM users WHERE email = '$email' AND password = '$hash_password' "; $result = mysqli_query($conn, $sql); $row = mysqli_fetch_array($result); if ($row['email'] == $email && $row['password'] == $hash_password) { echo '<script …

Member Avatar for Biiim
0
435
Member Avatar for allalhill

Hi all, My name is Mike and am a completely blind gamer/computer hobbyist. I am attempting to create an online web based single player game in which people can register so the stats, currency etc gathered are safekept and retrievable when someone wishes to continue playing. The data is stored …

Member Avatar for Josh Connerty
0
35
Member Avatar for Marco_18

Hi guys, I am using bootstrap carousel and I have some problem with the slide display. I can't switch from one slide to another In the code I have commented the <div class = "item active"> This way the video appears to me as desired, fully functional. If I remove …

Member Avatar for Josh Connerty
0
58
Member Avatar for forgot

> Hi, please advise how to resolve. I want to print the receiptno on a receipt and it prints "receiptno". I don't know how to define "receiptno" to use the value in the table. I'm working with mysqli and having trouble with this code: $receiptno='receiptno'; $sql = "UPDATE numbers SET …

Member Avatar for Schol-R-LEA
0
56
Member Avatar for oninchan

Parse error: syntax error, unexpected variable "$sql" in C:\xampp\htdocs\ProjectIT12\LR\controller.php on line 38 <?php include_once ("connection.php"); // connection created succesfullly session_start(); //store all erros $errors=[]; //When sign up button clicked if(isset($_POST['signup'])){ $fname = mysqli_real_escape_string($conn , $_POST['fname']); $mname = mysqli_real_escape_string($conn , $_POST['mname']); $lname = mysqli_real_escape_string($conn , $_POST['lname']); $street = mysqli_real_escape_string($conn , $_POST['street']); …

Member Avatar for pritaeas
0
73
Member Avatar for skymhine

if (count($_FILES) > 0) { if (is_uploaded_file($_FILES['userImage']['tmp_name'])) { $imgData = addslashes(file_get_contents($_FILES['userImage']['tmp_name'])); $imageProperties = getimageSize($_FILES['userImage']['tmp_name']); $sql = "INSERT INTO trial (imageType ,imageData,uploaded_on, user_id,tax_payer_id) VALUES('{$imageProperties['mime']}', '{$imgData}',NOW(),'".$_SESSION['id']."','".$_GET['id']."')"; $current_id = mysqli_query($db, $sql) or die("<b>Error:</b> Problem on Image Insert<br/>" . mysqli_error($db)); $current_id = mysqli_insert_id($db); if (isset($current_id)) { echo "Upload Succesfully"; }else{ echo "There is a …

Member Avatar for Dani
0
45
Member Avatar for skymhine

<?php if (count($_FILES) > 0) { if (is_uploaded_file($_FILES['userImage']['tmp_name'])) { $imgData = addslashes(file_get_contents($_FILES['userImage']['tmp_name'])); $imageProperties = getimageSize($_FILES['userImage']['tmp_name']); $sql = "INSERT INTO qr(user_id,file_name ,QrCode) VALUES('".$_SESSION['id']."','{$imageProperties['mime']}', '{$imgData}')"; $current_id = mysqli_query($db, $sql) or die("<b>Error:</b> Problem on Image Insert<br/>" . mysqli_error($db)); if (isset($current_id)) { header("Location: preview.php"); } } } ?> <form name="frmImage" enctype="multipart/form-data" action="" method="post" class="frmImageUpload"> …

Member Avatar for Dani
0
97

The End.