10,940 Topics

Member Avatar for
Member Avatar for skymhine

<?php if(isset($_SESSION['id']) ) { ($_SESSION['id']) { //echo "you're login"; } echo "<form action='upload.php' enctype='multipart/form-data' method='post'> <br>Qr Code: <p><input type='file' name='file' > <p><input type='submit' value='Upload' name='submit'> </form>"; } ?> <?php $statusMsg = ''; // File upload path $targetDir = "qr_code/"; $fileName = basename($_FILES["file"]["name"]); $targetFilePath = $targetDir . $fileName; $fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION); …

Member Avatar for skymhine
0
85
Member Avatar for NALB

hello , i wanna do something as below but the problem that names and address out of the connection query are empty how can i assign them and the send them to the page? app.get('/reports', (req, res)=>{ let sql = "SELECT DISTINCT name from users_table ;"; let names; let query …

Member Avatar for jamesfilipson
1
1K
Member Avatar for wellho188

Hello I just want to ask for some help regarding with the undefined index error. The image are uploaded / stored in database but the image cant store in folder directory. Please can someone help me. This is for my project. Thank you guys in advance.

Member Avatar for rproffitt
1
48
Member Avatar for Adolfo_1

Hi ... how can i have url seo friendly from database ?? Example: localhost/myshop/product.php? id = 95 Or: https://www.myshop.it/product.php?id=95 I have done several tests with .htccess but it doesn't work. I would like to have as follows: https://www.myshop.it/product.php/shoes-armani Or: https://www.myshop.it/shoes-armani tbl_product +-------------+----------------+-----+----------------+ | p_id |p_name | p_name_friendly| +-------------+----------------------+----------------+ | 95| …

Member Avatar for Dani
0
203
Member Avatar for Aslina

I have a problem assigning position (number) based on the total marks. Here is the code. TQvm for your assistance the calculation is done perfectly, the ranking is shown correctly but with no numbers, 1, 2 ,3..... how to set autoincrement for this field (ranking) which is based on the …

Member Avatar for john_111
0
54
Member Avatar for Maylene_1

Hi, below is the code in my login button, yet I'm confused what code to put in logout button. I only know few knowledge about vb.net and I am trying to understand it as much as I can. Thank you for understanding! :) Public Class Form2 Private OPConStr As String …

Member Avatar for Santanu.Das
0
308
Member Avatar for Phillip_8

Hi guys im trying to do a Login system in Wpf with Visual Studio I got the code and DB working fine with Windows Forms in Visual Studio I have changed the code 3 times and they all work on Windows forms but not with Wpf Forms. Below is the …

Member Avatar for Santanu.Das
0
135
Member Avatar for WpgnGaming

I have a issue with the code below what I am trying to get the image from gifts table with matching the user_gifts id with the gifts_id but can not seam to get it right anyone god any ideas thanks. public function get_my_gifts($user_id) { global $db; $my_gifts = []; $get_my_gifts …

Member Avatar for pritaeas
1
94
Member Avatar for minoesje

Hello I'm trying to create an update statement where it updates inlever_datum with a date from now + 7 days later I already have this case "0": //doesn't work $id = $_GET['id']; $date = date("Y-m-d"); $new_date = date('Y-m-d', strtotime($date. '+7 day')); // je moest '' eromheen zetten $sql = "UPDATE …

Member Avatar for AndrisP
0
59
Member Avatar for naimake

Hi, I need your help. I am a newbie in PHP and my update statement is not working despite seeing all the values from the console. My code for the bootstrap modal file: <!----------------------------------- modal begin --------------------------------------> <div class="modal fade" id="editmodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div …

1
30
Member Avatar for emiliolorenzo30

$sql = "SELECT cl_id, cl_name, cl_service_description, cl_contact, cl_dept,status, expiry_date from contract_list"; $result = $conn-> query($sql); if($result->num_rows > 0) { while($row = $result-> fetch_assoc()) { echo "<td>$row[cl_id]</td>"; echo "<td>$row[cl_name]</td> "; echo "<td> $row[cl_service_description]</td>"; echo "<td>$row[cl_dept]<td>"; echo"$row[status]"; echo "<td>$row[cl_contact]</td>"; echo "<td>$row[expiry_date]</td>"; echo "<td></td>"; echo "<td><div class=table-data-feature>"; echo "<button class='item' data-toggle='tooltip' data-placement='top' title='send'>"; …

0
24
Member Avatar for nalb4242

Hello , I have a program which show reports of students i habe multipile dropdown lists in my page and what the supervisor do is selecting what he wants to show first " for example students who live in usa " /ps i have multi dropdown lists /then my program …

0
38
Member Avatar for NALB

hello i'm trying to schedule event from mysql in node js i know how to execute query (connection.query("select * from test") but how to do that in nodejs --------> CREATE EVENT IF NOT EXISTS reurring_event ON SCHEDULE EVERY 1 MINUTE STARTS CURRENT_TIMESTAMP ENDS CURRENT_TIMESTAMP + INTERVAL 1 minute DO INSERT …

0
64
Member Avatar for Issah_1

[ { "regionCode": "0", "": { "amount": "291377681.35999995", "kwh": "5589027.089364664", "numberOfPay": "43876" } }, { "regionCode": "3", "AZARE Region": { "amount": "13494424.550000023", "kwh": "286885.42398979055", "numberOfPay": "3863" } }, { "regionCode": "7", "BAUCHI Region": { "amount": "55739882.11", "kwh": "1297297.378804144", "numberOfPay": "11199" } }, { "regionCode": "5", "BUKURU Region": { "amount": "77074190.08000007", …

Member Avatar for Dani
0
34
Member Avatar for Omar_17

I moved my website from host to another, moved database and public_html file, Also, I modified wp-config file and deleted hlaccess. But, now I can't update any plugin or delete there is message said update_option( 'siteurl', 'https://zone1on.com' ); update_option( 'home', 'https://zone1on.com' ); Skip to main contentSkip to toolbar At the …

Member Avatar for Dani
0
101
Member Avatar for NALB

Hello ... i have a table which has one button i need to send the id of that record in the table to the next page the will be directed to once i click the butoon i don't want to send it in the url ... so what i did …

Member Avatar for rproffitt
0
264
Member Avatar for Uperdominator

$company_id = $_SESSION['compid']; $sql="SELECT * FROM `movies` WHERE companyID = ? AND name LIKE '%$search%' OR description LIKE '%$search%' " ; $stmt=mysqli_stmt_init($conn); if (!mysqli_stmt_prepare($stmt,$sql)) { header("location:main.php?error=stmt failed"); exit(); } mysqli_stmt_bind_param($stmt,"i", $company_id); mysqli_stmt_execute($stmt); $result = $stmt->get_result();

Member Avatar for rproffitt
0
36
Member Avatar for NALB

hello i am using node js and mysql and i am dealing with payment table and i wanna insert record automatically based on the date and perod for example i have student who will pay every week something so i wanna be able that insert record every week in my …

Member Avatar for rproffitt
0
26
Member Avatar for ashraftushar

Hi I have mysql table as below id | item_id | date | received Now I want to make a html table from above data where columns are year and rows are months. and value will be sum of received on month _ year. like below demo | | 2018 …

Member Avatar for rproffitt
0
23
Member Avatar for martin_57

Hi, I am currently working on a banlist and I am thinking about which data type to choose for storing the IP address in the database. Will the Binary data type be ideal?

Member Avatar for Vikas_30
0
547
Member Avatar for forgot

> Hi guys, I blinked and got lost. All I want to do is copy Payfile to Pmtfile and then update records in Payfile that have been paid(amtpaid !=''). The update doesn't happen and the insert-note comments at botom of post. <?php $link = mysqli_connect("localhost", "root", "", "prerentdb"); // Check …

Member Avatar for patk570
0
76
Member Avatar for jsrankin

Been programming more than half my life and been in industry for over a decade.

Member Avatar for Reverend Jim
0
47
Member Avatar for Onatola
Member Avatar for Peleg
0
108
Member Avatar for Hidayah_1

Hi. I got some problem. I want to search data from 2 tables in database and display the result based on the search value. For example, I search employee id number, it will search the employee id number in table 1 and table 2. If the data exist in either …

Member Avatar for pritaeas
0
62
Member Avatar for ianhaneybs

I have a database that has columns called start date, start time, end date and end time and want to be able to output the difference so it shows the total time spent per project. Below is the code I have but it shows the error PHP Fatal error: Uncaught …

Member Avatar for lps
0
190
Member Avatar for Hayic

<?php $name = $email = $password = $repeatpass = ''; $name = $_POST['name']; $email = $_POST['email']; $password = $_POST['password']; $repeatpass = $_POST['repeatpass']; $con = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $sql = "INSERT INTO user-regis (name, email, password, repeatpass) VALUES ('$name', '$email', '$password', '$repeatpass')"; $result = $con->query($sql); if (!$result) { header("Location: …

Member Avatar for Dani
0
98
Member Avatar for Hayic

<?php require_once './includes/config.php'; $con = new mysqli(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME); $sql = "SELECT * FROM contact-info"; if($result = $con->query($sql)){ while($row = $result->fetch_object()){ //display record 1 by 1 printf(' <tr> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </tr> ',$row->id, $row->name, $row->email, $row->phone, $row->comment); } } printf(' <tr> <td colspan="5"> %d record(s) returned. [ <a href="insert-student.php">Insert Student</a> …

Member Avatar for rproffitt
0
28
Member Avatar for ianhaneybs

I have managed to get blog posts displayed from each blog category but I want to limit it to 1 article from each blog category but unsure how to do it in the sql query I have, below is what I have so far (SELECT BP.postID,postTitle,postSlug,postDesc,postDate,postImage FROM blog_posts BP, blog_post_cats …

Member Avatar for le5691
0
66
Member Avatar for GLentooth

hi i just came here if theres someone who coudl help me with my problem whenever i add a new user this keeps on appearing\ "INSERT INTO teacher_info (firstname,middlename,lastname,gender,address,date_joined,username,password) VALUES ('John','Doe','Doenut','Male','New york USA','2021-06-11','john','admin') Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of …

Member Avatar for pritaeas
0
234
Member Avatar for Logic_Brown

I found this peaice of code to import a Access database table to sql server Private Sub btnImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImport.Click Dim fileName As String = "" Dim ofd As New OpenFileDialog If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then fileName = ofd.FileName PerformImportToSql(fileName) End If End …

Member Avatar for SoftBa
0
625

The End.