10,940 Topics
| |
I got an empty file whenever i download any file. This is an php file where pateint can download his report by entering his appointment id and password. <?php error_reporting(0); include'include/database.php'; if($_POST['sbutton']) { $appid=$_POST['apid']; $password=md5($_POST['pass']); $result=mysqli_query($conn,"select patientId from appointments where app_id='$appid'") or die(mysqli_error($conn)); $row=mysqli_fetch_array($result); $result2=mysqli_query($conn,"select password from patients where id='".$row['patientId']."'") … | |
<?php $firstname = $_POST{'firstname'}; $username = $_POST{'username'}; $emailaddress = $_POST{'emailaddress'}; $password = $_POST{'password'}; $contact = $_POST{'contact'}; //Database connection $conn =new mysqli('localhost','root','','registration'); if ($conn->connect_error) { die('connection failed : '.$conn->connect_error) }else{ $stmt = $conn->prepare("insert into users(firstname, username, emailaddress, password, contact) vlaues (?, ?, ?, ?, ?)") $stmt-> bind param("ssssi",$firstname, $username, $emailaddress, $password, … | |
Hi All, I dont know if anyone could help me, I am going slightly mad. I have been following some online demos of creating a simple application using VB.NET / Visual Studio and MYSQL database. I have setup the MySQL database and that looks fine, I would like it to … | |
I wrote this line of code: database = {"host":host, "user":user, "password":password, "db":db, "charser":charset, "cursorclass":cursorclass} and i'm receiving this: {'host': '35.234.92.142', 'user': "b'freedbtech_'", 'password': "b''", 'db': "b'freedbtech_cursopython'", 'charset': 'utf8mb4', 'cursorclass': "<class 'pymysql.cursors.'>} i need to remove those "b's" and " ' " in the strings, but i don't know how to … | |
I have an array list that looks like this. 8.1,6.5,4.4,3.2,1,8.9,5,1.4,0.1,1,8.7,6.2,4.3,3.2,3 I would like that my program selects every 5 numbers randomly. for example to select 8.1,6.5,4.4,3.2,1,8.7,6.2,4.3,3.2,3 as you can see it selected 5 numbers from the begging and 5 more from the end and saves them Random random_method = new … | |
I am currently creating a simple invoice page. But I am also having a hard time retrieving and displaying the price and description of items selected by the userfrom my dropdown (dropdown is populate from database). My knowledge of jquery and php were not that deep yet. I hope someone … | |
$ array = array ('Main', 'Photo Gallery', 120, 'Rustam', 'Services', 'Lesson 12', 'Link'); This array also contains menu items for the web page. Describe the required menu items in HTML lists. | |
Good day! I am new in vb.net and I want to detect if there is a duplicate of the record that a user will try to add. If the user adds an existing username from the database then it will show an error that the username has already been used. … | |
<?php $pdo = new PDO('mysql:host=localhost;port=3306;dbname=crud', 'root', ''); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $title = $_POST=['title']; $description = $_POST = ['description']; $price = $_POST = ['price']; $date = date('Y-m-d H:i:s'); $products = $statement = $pdo->prepare("INSERT INTO products (title, image, description, price, Create_date) VALUES (:title, :image, :description, :price, :date)"); $statement->bindValue(':title', $title); $statement->bindValue(':image', ''); $statement->bindValue(':description', $description); … | |
Actually I'm studying sciences computer in Belgium | |
I have two different files, fileA contains employee data (ID and townCode) while file B contains field office data (OfficeID, Town, TownCode, officeCapacity) and a town can contain more than one office. i want to distribute these employees to the offices in the town against their names evenly What I … | |
I have my resoruces stored in mysql DB: eg : > |IPaddress | Status| |10.x.x.x| yes| |10.1.x.x| yes| I am trying to get the available resource and after that will update DB with status No. > query = ("SELECT IPaddress from TABLE where status='yes'") cursor = mydb.cursor() cursor.execute(query) result=cursor.fetchall() query1 … | |
ScanningI'm looking forward to implement a typical "nav" section for the articles in my website. Something like this: **Folder > SubFolder > SubSubFolder** To this end, I think that the best way is to create a database of two tables. The **first** one is called "*Category*": id - title - … | |
| For example: Http:localhost:8080/api/customer/{id} If I post in postman instead of Id a parameter it will work fine , But in html I’m asking the user for an input and than I want to pass the input in the path instead of the Id Is it possible ? Only spring boot … |
Create database with the name of "university". You have only two table with the name of "signup" and "student". In Student table you will collect all data of student like cms, name, address ,age, mob and cnic. Perform Multiple Task which are given below. 1) Create Login and Signup page … | |
Hi all I have uncountered a problem which has me totally confused. The problem is I have created a website with a login form. Everything so far has been working fine. but then when I try to login all of a sudden I’m hit with a "Object not found! The … | |
i am newbie in programming i really need help on creating a job order form for my boss | |
Hello, I created a function to show data related to a database called skede with fields "name" "surname" "age" in a page called vive.php This is the code function mostraskede(){ $ricercaskede = query('SELECT * FROM skede ORDER BY id LIMIT 1 OFFSET 0'); conferma($ricercaskede); while ($row = fetch_array($ricercaskede)){ //echo $row['titolo']; … | |
i am completly stuck with some problems in programming, talking exactly aboutt linked list and some others can anyone help me? | |
<?php if(isset($_POST['submit'])){ $kategori = $_POST['kategori']; $nama = $_POST['nama']; $harga = $_POST['harga']; $deskripsi = $_POST['deskripsi']; $status = $_POST['status']; $filename = $_FILES['gambar']['name']; $tmp_name = $_FILES['gambar']['tmp_name']; $type1 = explode('.', $filename); $type2 = $type1[1]; $newname = 'produk'.time().'.'.$type2; $tipe_diizinkan = array('jpg', 'jpeg', 'png', 'gif'); if(!in_array($type2, $tipe_diizinkan)){ echo '<script>alert("Success")</script>'; }else{ move_uploaded_file($tmp_name, './produk/'.$newname); } } ?> **Error … | |
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 … | |
Hi, My insert funcation is added below, as in php 5.6 i was able to post array data to database using below funcation but in php 7 it was not working i spend hours to find an solution but nothing is working. Insert funcation public function insert($table, $data) { $formattedVals … | |
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 … | |
<?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"> … | |
do not understand this | |
<?php $sql = "Select * From offices"; $result = mysqli_query($conn,$sql); while ($row = mysqli_fetch_array(result)){ echo $row['name']; } ?> // while ($row = mysqli_fetch_array(result)){ is line 188 | |
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. … | |
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 … | |
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 … |
The End.