10,940 Topics

Member Avatar for
Member Avatar for 2020_man

Php Seniors, I still on OOP and mysqli. Not on pdo or oop yet. So, kindly show samples to that level, if you must. Can you tell me if this query is ok to get row count ? It works on my side but I need your confirmation. [code] $query_2 …

Member Avatar for AndreRet
0
63
Member Avatar for fecapeluda

Hello guys i'm using [batflat](https://github.com/sruupl/batflat/blob/master/inc/core/lib/Image.php) for a small project. The thing is want to save/display webP images too, How can it enabled/possible?. I try **imagecreatefromwebp** without luck. Any idea/help will be awesome. Gracias! /** * Saves image * * @param string $path Path to location * @param string $type Filetype …

Member Avatar for AndreRet
0
234
Member Avatar for Martin_42

Hi all I'm trying to put together a room hire site, to be used by the lettings clerks, for our local Quaker meeting house and I've hit a couple of problems. I have an HTML form that, using data from a MySQL database and some JSON and JavaScript, when a …

Member Avatar for Martin_42
0
294
Member Avatar for mexabet

I'm struggling to add a course to a MySQL database table using PDO prepared query with positional placeholders. When the form is submitted, the database table is not updated, as expected and no error is displayed. Please, where exactly do I place `var_dump()` to display the error? And how can …

Member Avatar for mexabet
0
244
Member Avatar for emiola

Hello, kindly look at my php code to insert registration data into a MySQL database. Here is the code below and further below, the error response I keep getting. <?php error_reporting(E_ALL); ini_set('display_errors', 1); $servername = "localhost"; $username = "emiola"; $password = "emmybaba2020"; $dbname = "tutors"; // Create connection $conn = …

Member Avatar for AndreRet
0
112
Member Avatar for nishita_1

please help me. below chart.js works very well but here show all date data from database but i want only last fifteen days data to show. How can i show last 15 days sale reports. i am attach code below. thanks ![chart_edit_result.PNG](/attachments/large/4/3b3130d6f7da66a0d9ff733730021645.PNG) I an developed an chart.js for my daily …

Member Avatar for pandglobal
0
4K
Member Avatar for kumud1452894
Member Avatar for Erd_1

I am just getting this mistake **" Parse error: syntax error, unexpected 'if' (T_IF) in C:\wamp64\www\genius\install\run_install.php on line 48" **is there anyone to solve?** ** <?php define('GENIUSOCEAN','https://geniusocean.com/verify/'); ini_set('max_execution_time', 300); if (!isset($_POST['web_name']) || $_POST['web_name'] == ""){ echo "Please Enter Website Name"; }else if (!isset($_POST['web_url']) || $_POST['web_url'] == ""){ echo "Please Enter …

Member Avatar for AndreRet
0
210
Member Avatar for nishita_1

please provide me sql query for below output sum query please help me ![93852217_246197733117734_2443195689677619200_n.jpg](/attachments/large/4/5009c5b4125b294842ffd7cf1d839caa.jpg)

Member Avatar for Santanu.Das
0
319
Member Avatar for Shiva_20

$select = "SELECT * FROM `success-stories` where id='$id'"; $result = $conn->query($select); $row = $result->fetch_assoc(); $file = $row["download_pdf"]; $file_arr = explode("/", $file); $path = $file_arr[0] . "/" . $file_arr[1] . "/" . $file_arr[2]; header('Content-Description: File Transfer'); header('Content-Type: application/pdf'); header('Content-Disposition: attachment; filename="' . basename($file) . '"'); header('Expires: 0'); header('Pragma: no-cache'); header('Content-Length: ' …

Member Avatar for pritaeas
0
28
Member Avatar for John_266

I have to make a program that reads the number of seats and stores it in a two dimensional array. The empty seats is hashtag and if the user buys a seat it becomes *. The odd rows have 15 seats and even have 20. When I purchase a seat, …

Member Avatar for ButcherHix
0
269
Member Avatar for Rolland_1

Hi, could you please let me know what should I learn first about programing? I mean, may be I need to learn HTML, C++, Java, read a specific book, I don't know where to start and hope you can show me the way, please!! I would really appreciate it

Member Avatar for sonalid1701
0
193
Member Avatar for Ján_6

I need to improve my English communication skill, but I am very boring to use language learning tools/methods, but instead of this I would like remote working on some real PHP/JavaScript/Node.js/DevOps project (where I feel strong) and as a side effect would be practicing English communication. I have max 10 …

Member Avatar for luka98
0
145
Member Avatar for emart53

I have a MySQL table that lists delivery records (customerId, date, quantity, productId, cost). I have a requirement to log certain items from the delivery table into a separate table to track items being sent to quarantined areas. All quarantined products must have a serialized tag affixed for tracking with …

0
56
Member Avatar for R_4

Hi all, I have assigned a column called "friendshipstatus" as a default value =0 in addfriends table that user can add other users to it to be friends as the code bellow which will give any users added as friend in addfriendss table the "friendshipstatus" value of 1 <?php include …

Member Avatar for Dani
0
439
Member Avatar for beniwalsanjeev

I have a website, got it developed from someone, Need help in redirecting back after login in php. After Login it redirects to Home Page. But i want user to go back where he came from. logincontroller.php public function checklogin(Request $request){ $phone = DB::table('users')->where('contact','=',$request->input('code').$request->input('contact'))->get(); if(count($phone)>0){ $user_data = array( 'email' => …

Member Avatar for Dani
0
291
Member Avatar for larry29936

I'm trying to create a trigger that does two things, first take an ip that's in dot notation and run inet_aton on it and put the result in another field. Second, checks a lookup table to identify an ip range that the result of the first action falls into and …

Member Avatar for larry29936
1
251
Member Avatar for Dani

My code has a query that looks like: INSERT INTO table VALUES (...) ON DUPLICATE KEY UPDATE id = LAST_INSERT_ID(id), ... id is a PRIMARY KEY. My question is that I can't for anything remember why I have id = LAST_INSERT_ID(id). I wrote it years ago and it's not commented. …

Member Avatar for Dani
0
1K
Member Avatar for MattD00

I want to be able to update my database in order to change some dynamic content on my site which contains movie reviews. First Step I need to be able to select which movie review I want to update by selecting it from a dropdown menu which is dynamically populated …

Member Avatar for Jurijus
1
4K
Member Avatar for Yumaris

Notice: Undefined index: ID in C:\xampp\htdocs\tugas\phpdb\ubahsimpan.php on line 10 im tired ,,, how i can fix that? My ubahdata.php <html> <body> <?php $koneksi=mysqli_connect("localhost","root","") or die ("Koneksi Gagal".mysqli_error()); if($koneksi){ mysqli_select_db($koneksi,"buku") or die ("Database gagal dibuka".mysqli_error()); $ID=$_GET['ID']; //Mejalankan Querry $sql="select * from anggota where id_anggota='$ID'"; $qry=mysqli_query($koneksi, $sql) or die ("Querry gagal".mysqli_error()); $data=mysqli_fetch_array($qry); …

Member Avatar for pritaeas
0
240
Member Avatar for mr.matrix251

a) Write MARIE code to: 1. Input a number and store it in X . 2. Y will be equal to “

Member Avatar for rproffitt
0
122
Member Avatar for televizori

hello daniweb members i have added custom post type in Wordpress that works like slideshow, all slides are clickable and open in products slug. how can i query posts subcategories that match with the slide clicked? code for custom post type is this add_action( 'init', 'products_post_type' ); function products_post_type() { …

0
81
Member Avatar for nishita_1

Dear sir, Please help me about below query. here is two table sale and purchase. i want product wise result in output table like below picture. please help me ![22222.jpg](/attachments/large/4/f8a1f4cfc8eaaad4bde70a850826b310.jpg)

Member Avatar for drmrkrch
0
1K
Member Avatar for larry29936

I'm creating a report page and can't figure out how to convert the array (row) to just get the ip_address. I'm a newbie to php and can't figure out how to accomplish this. Here's the code that I have so far: <?php $filename = NULL; session_start(); // start of script …

Member Avatar for larry29936
0
465
Member Avatar for Alyana Diao

my system is savings account system, in which i tried to redirect to another php page with the same user id that i want to manage his/her account yet , when i deposit all of the users have the same fk, here is my code, hope you help me with …

Member Avatar for Dani
0
412
Member Avatar for Barbra_1

Hi there i need help on how I am supposed to do this ER Diagram based on this question. I need to have entities, attributes, relationships and primary/foreign keys. here is the question You are given the following business scenario. SmartService is a newly setup car repair and servicing workshop …

Member Avatar for pritaeas
0
215
Member Avatar for phirux

Hi everybody. I'm trying to print all sub-category items using my own defined PHP function. The purpose of this function is to print all items, which parent value is $parent. There is some thing wrong with this function why it doesn't show information as I wish. To make you understand …

Member Avatar for Dani
0
600
Member Avatar for Nuti

<?php include "database.php";?> <?php session_start();?> <?php // Getting total rows there in table $query="SELECT * FROM questions"; $results=$mysqli->query($query) or die($mysqli->error.__LINE__); $total=$results->num_rows; $row=$results->fetch_assoc(); //Reading the rows next by next and vice versa $offset=$row["question_number"]; // when button next is clicked it will fetch the next row if(isset($_POST["NEXT"])){ $offset++; } // if previous …

Member Avatar for Dani
0
171
Member Avatar for R_4

How can i check if email exists i have this code but it is not working <?php include "Config.php"; function mksafe($data){ $data=trim($data); $data=strip_tags($data); $data=htmlspecialchars($data); $data=addslashes( $data); return $data; } $fname = mksafe($_POST["fname"]); $lname = mksafe($_POST["lname"]); $email = mksafe($_POST["email"]); $sql = "SELECT * FROM `users` WHERE `email`=$email"; $result = $conn->query($sql); if($result->num_rows …

Member Avatar for R_4
0
399
Member Avatar for Patiodude

I've just started working with PHP and MySQL, and I'm trying to create a table in MySQL. If I've got this right, I'm trying to do so by going to my host's SQL MyAdmin page and typing in mysql_query("CREATE TABLE example( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), …

Member Avatar for surveypacific
0
884

The End.