10,940 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
How to create a synchronized Online/Offline data application with php/mysql | |
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 … | |
$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: ' … | |
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, … | |
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 | |
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 … | |
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 … | |
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 … | |
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' => … | |
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 … | |
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. … | |
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 … | |
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); … | |
a) Write MARIE code to: 1. Input a number and store it in X . 2. Y will be equal to “ | |
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() { … | |
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) | |
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 … | |
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 … | |
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 … | |
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 … | |
<?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 … | |
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 … | |
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), … |
The End.