already this phone number registration in alert msg how to display in php and mysql

Member Avatar
Member Avatar
-1 forum 1

Hello everyone, I am new to this daniweb community and I really hope you guys will help me with this as I am baffled at what I couldn't come up with or was it not possible to do that? I want to have a checkbox on either PHP page or on modal like I did below to be checked, then save (submit), and stored in the mysql database so users can have ability to hide or show the product's description every time we go there without it coming back when the page refresh or whatever...Is there any possible that it …

Member Avatar
Member Avatar
+0 forum 2

[MYSQL] my query is:- SELECT * FROM (SELECT 'attendence' AS 'type',userAS 'username', STR_TO_DATE(in_time, '%d-%m-%Y %H:%i:%s') AS 'time_in', 'in_address' AS 'address_in', STR_TO_DATE(out_time, '%d-%m-%Y %H:%i:%s') AS 'time_out', 'out_address' AS 'address_out' FROM attendence UNION ALL SELECT 'visit', username, STR_TO_DATE(visit_time_in, '%d-%m-%Y %H:%i:%s'), location_in, STR_TO_DATE(visit_time_out, '%d-%m-%Y %H:%i:%s'), location_out FROM visits) t WHERE t.username = 'MCCuser0036' AND time_in BETWEEN STR_TO_DATE('01-01-2019', '%d-%m-%Y %H:%i:%s') AND STR_TO_DATE('27-04-2019', '%d-%m-%Y %H:%i:%s') ORDER BY time_in ASC; and result is:- +------------+-------------+---------------------+----------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------------------------------------------+ | type | username | time_in | address_in | time_out | address_out | +------------+-------------+---------------------+----------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------------------------------------------+ | attendence | MCCuser0036 | 2019-01-25 11:02:09 | in_address | 2019-01-25 11:02:10 | out_address | | visit | …

Member Avatar
Member Avatar
+0 forum 1

Hi, I want to make online shop and I made most of it but I have problem on product page.I want for "customers" ( this is my personal project so ... ) to be able to choese and then what they choese to be store into table. I struggling with this more then 3 hour , I try everyhing , this is my last shoot. (I used the echo because I want to show it , so after that I would put insert into, but ... I was not able to do it ) <?php $con = mysqli_connect("localhost","root","","basic"); $query = …

Member Avatar
Member Avatar
+0 forum 1

hello every one please can any body do this task for me please becouse our instructor in the university uploaded it and I dont have enough time becouse im studying for my final exams please any one and i will be helpfull for him/her :) this is the task Create a car rental system where customers rent cars for a given period of time. Car – a class for all cars. Holds car information and an array of rents. Implement several types of cars as subclasses: Small car – 4 passengers, Motor 1200, air-conditioner Medium car – 4 passengers, Motor …

Member Avatar
Member Avatar
+0 forum 2

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in C:\Users\USER\Desktop\Final Year Project\XAMPP\htdocs\littleavenue\shop.php on line 320 <?PHP if(!isset($_GET['product_category'])){ if(!isset($_GET['category'])){ $per_page = 6; if(isset($_GET['page'])){ $page = $_GET['page']; } else { $page = 1; } $startfrom = ($page-1) * $per_page; $getproducts = " SELECT * FROM products OREDR BY 1 DESC LIMIT $startfrom, $per_page"; $runproducts = mysqli_query($connection,$getproducts); ////LINE 320 //// while($row = mysqli_fetch_array($runproducts)){ ////LINE 320//// $productid = $row['product_id']; $producttitle = $row['product_title']; $productprice = $row['product_price']; $productimgone = $row['product_img1']; echo "<div class='col-md-4 col-sm-6 center-responsive' > <div class='product' > <a href='productdetails.php?product_id=$productid' > <img src='admin/product_images/$proproductimgone' class='img-responsive' > </a> <div class='text'> <h3><a href='productdetails.php?product_id=$productid'>$producttitle</a></h3> <p class='price'>$ $productprice</p> …

Member Avatar
Member Avatar
+0 forum 1

Hi all, I am very new to PHP and MYSQL and have a class assignment I need help with. I am trying to make a page with an HTML form that will update my MYSQL database. You can view my pages online here: [URL="http://baileyjumper.aisites.com/Scripting-Week7/homework4/exercise-five.php"]http://baileyjumper.aisites.com/Scripting-Week7/homework4/exercise-five.php[/URL] I need help with the "Edit" section, if you look online. Here is the code for my Edit page: [CODE=PHP] <?php $hostname = "localhost";//host name $dbname = "baileyjumper_imd203";//database name $username = "baileyjumper_imd";//username you use to login to php my admin $password = "chris4ever";//password you use to login //CONNECTION OBJECT //This Keeps the Connection to the Databade …

Member Avatar
Member Avatar
+0 forum 21

Hello i have this form and my php code skills not very good if someone make change password I would be glad thank you <div class="col-lg-9"> <div class="nk-box-3 bg-dark-1"> <form class="change-password" method="post" action=""> <input type="password" class="form-control input-change-password" name="opass" id="opass" placeholder="Old Password"> <div class="nk-gap-1"></div> <input type="password" class="form-control input-change-password" name="npass" id="npass" placeholder="New Password"> <div class="nk-gap-1"></div> <input type="password" class="form-control input-change-password" name="cnpass" id="cnpass" placeholder="Repeat New Password"> <div class="nk-gap-1"></div> <button type="Update" class="nk-btn link-effect-4 ready"><span class="link-effect-inner"><span class="link-effect-l"><span>Change password</span></span><span class="link-effect-r"><span>Change password</span></span><span class="link-effect-shade"><span>Change password</span></span></span></button> </form> </div> </div>

Member Avatar
Member Avatar
+0 forum 12

i really need help, am new in programming and youtube is my teacher. i really need assistance to install Cryptomarket Trading System Installer in to my cpanel.

Member Avatar
Member Avatar
+0 forum 1

In mysql database i created "leave" table: CREATE TABLE `leave` ( `ID_LEAVE` int(11) NOT NULL, `ID_WORKER` int(11) NOT NULL, `BEGIN_DATE` datetime DEFAULT NULL, `END_DATE` datetime DEFAULT NULL ) INSERT INTO `leave` (`ID_LEAVE`, `ID_WORKER`, `BEGIN_DATE`, `END_DATE`) VALUES (3, 26, '2019-03-20 07:00:00', '2019-03-21 15:00:00'), (4, 22, '2019-03-20 07:00:00', '2019-03-20 15:00:00'); "Workers" table: CREATE TABLE `workers` ( `ID_WORKER` int(11) NOT NULL, `FNAME` varchar(20) NOT NULL, `LNAME` varchar(20) NOT NULL ) INSERT INTO `workers` (`ID_WORKER`, `FNAME`, `LNAME`) VALUES (22, 'ALAN', 'FAST'), (23, 'LEON', 'SPEED'), (24, 'ADAM', 'GREEN'), (25, 'DAVID', 'BUCS'), (26, 'JACK', 'FAR'), (27, 'ADAM', 'GAX'), (28, 'ANDREW', 'WORM'); "Orders" table: CREATE TABLE `orders` …

Member Avatar
+0 forum 0

Hello everyone , I have find i script made in 2013 that use Mysql , Today the mysql has removed and remplaced by Mysqli or PDO Can any one help me please to convert the mysql code to mysqli Exemple : <?php $num_queries = 0; $total_time = 0; class ADO { function ADO($host,$user,$password,$database) { $this->connection=mysql_connect($host,$user,$password); if(!$this->connection) { echo "<br>Database Error!!!<br>".mysql_error(); } mysql_select_db($database); } function exec($sql) { // echo "<br />".$sql; //exit; // global $num_queries; // global $total_time; // $num_queries++; // $start_time = microtime(true); // echo "<br />".$num_queries." ".$sql; $result=mysql_query($sql,$this->connection) ; if(!$result) echo "<p>ERROR::".mysql_error()."<br><strong>".$sql."</strong></p>"; // $time_taken = round(microtime(true) - $start_time, 4 …

Member Avatar
Member Avatar
+0 forum 1

Hello i have a problem with a Sql script `SELECT col1_id, col1_name, col2 FROM table GROUP BY ?????` col1_id col1_name col2 A john bear A john dog A john cat A john bear A john dog A john cat A john dog A john cat A john bear A john dog A john cat A john bear A john dog A john cat A john dog A john cat I want to return all results. It has to return like this: ` echo col1_id . col1_name` (A john) and then `col2` (bear,dog, cat)

Member Avatar
Member Avatar
+0 forum 4

So here's a little background to help with what I'm trying to accomplish (be mindful I'm also fairly new to MySQL): I'm creating a dynamically built navigation for a website using PHP and MySQLi. I've created a class called *Database* where I've got helper functions, such as connect() for connecting to the database, and the like. Then I have another class called *Navigation* which extends *Database*, and there I'm creating helper functions to do specific things for the database that holds my navigation links, such as selecting and inserting and so on. Now, the following code works flawlessly when working …

Member Avatar
Member Avatar
+0 forum 9

Hi, I am developing a system that need to monitor machines' licence, so i have a field 'movedate' and 'outdate' every machines can only been kept for 2 years for most. and if the machine didn't go out for almost 2 years, an alert will come out to remind the tenant. I want the alert will come out about 2 weeks before the expire date. But Im not sure how to do it..can someone guide me?

Member Avatar
Member Avatar
+0 forum 10

Hello i want to UNION three tables from the same database. SELECT DISTINCT * FROM (SELECT uid as id, name as name, username as username,bio as aboutme, '' as text, 'user' as type, profile_pic as profile_pic, '' as media_pic, '' as group_pic, 'U' as mediatype, '' as image_path FROM users ORDER BY rand() LIMIT 5) AS T UNION ALL (SELECT group_id as id, group_name as name,'' as username, group_desc as aboutme, '' as text, 'group' as type, '' as profile_pic, '' as media_pic, group_pic as group_pic, 'G' as mediatype, '' as image_path FROM groups ORDER BY rand() LIMIT 5) UNION …

Member Avatar
Member Avatar
+0 forum 3

Hi All, I am building an eCommerce website and I really new to PHP and MYSQL but loving the challenge. On my website I have 9 different categories of products with each page having about 8 items to sell. Rather than duplicating the code from each .php/.html file into a new file and change the SQL query, is it possible to write a script that says when the user clicks on category1 in the navigation bar, show all the products in category1? Hope this makes sense. Thanks in advanced.

Member Avatar
Member Avatar
+2 forum 7

I have a webpage which helps download files from database. I want to count the how many times the download button has been clicked and display it on my webpage with unique id. This is my download webpage <div class="container"> <div class="row"> <div class="col-12"> <div class="media"> <img src="./images/<?= $mainImage; ?>" alt="PowerBeatz" width="300" height="300" /> <div class="media-body"> <h5 class="mt-0"><span class="title"><?php echo $row['song']; ?></span></h5> <?php echo $row['artist']; ?> <div class="play"> <a href="file.php?id=<?php echo $row['song_id']; ?>" class="btn btn-primary"><i class="fa fa-download"></i> </a> </div> <div> <p>Total Downloads: </p> </div> </div> </div> </div> </div> </div>

Member Avatar
Member Avatar
+0 forum 2

--Hi DaniWeb. I have been doying bulk data Uploads from Excel Sheet to MySql data base and hence thought that I may need the reverse of this process and so Export MySql Tables into Excel Format for Backup purposes (I also will be happy for a better suggestion for a better data backup solution if is any from this like saving them in .sql readable format and ready for upload Programatically as the way is there if I go to Php Myadmin). For now I just wanted to have something of the sort as I alredy have a mechanism for …

Member Avatar
Member Avatar
+1 forum 4

Hello webmasters, I have a website about memes and I want to update the database each time the user scrolls down. I have no problem when I make a few requests to the database, but what if I want to do a lot of requests in a large database? I recently had to refactor my code to exclude some code that is important just for the sake of performance. Is there any way around it? How does Facebook do it?

Member Avatar
Member Avatar
+0 forum 3

<?php session_start(); ?> <?php include('dbcon.php'); ?> <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="form-wrapper"> <form action="#" method="post"> <h3>Login here</h3> <div class="form-item"> <input type="text" name="user" required="required" placeholder="Username" autofocus required></input> </div> <div class="form-item"> <input type="password" name="pass" required="required" placeholder="Password" required></input> </div> <div class="button-panel"> <input type="submit" class="button" title="Log In" name="login" value="Login"></input> </div> </form> <?php if (isset($_POST['login'])) { $username = mysqli_real_escape_string($con, $_POST['user']); $password = mysqli_real_escape_string($con, $_POST['pass']); $query = mysqli_query($con, "SELECT * FROM users WHERE password='$password' and username='$username'"); $row = mysqli_fetch_array($query); $num_row = mysqli_num_rows($query); if ($num_row > 0) { $_SESSION['user_id']=$row['user_id']; header('location:home.php'); } else { echo 'Invalid Username and Password Combination'; } } ?> <div …

Member Avatar
Member Avatar
+0 forum 3

Hi, I am trying to insert to insert a video into a folder and its path into the database. But both the things are not working for me. And also I need to retrieve the video from database. Can someone help me where i went wrong. My html to upload video is <form action="" method="post" enctype="multipart/form-data"> <div class="form_search"> <label>Upload Video Profile:</label> <span class="form_input"> <input type="file" name="uploadvideo" /> </span> </div> <div class="form_search"> <label> &nbsp;</label> <span class="form_input"> <input type="submit" name="submitdetails" value="Upload" class="button"/> </span> </div> </form> and my php code to store the video in a folder named "company_profile" is <?php if(isset($_POST['submitdetails'])) { …

Member Avatar
Member Avatar
+0 forum 5

inside mysql db which is table employe in coloumn *id_employee*, some data have a leading zero, etc : **id_employee : 0378192918 empy_name : Daniweb** i need to get id_employee for delete employe in my aplication, then i using ajax method like this : if(id) { alert(id); $("#deleteBtn").unbind('click').bind('click',function(){ $.ajax({ url: 'pegawai/delpeg.php', type:'post', data: {emp_id : id}, datatype: 'json', success:function(response) { return value is **378192918**, the first number **0** not showing in alert box. why ? then how to get entire value id_employe from db ?

Member Avatar
Member Avatar
+0 forum 8

Hi, I want to design DB for posts with multiple subcategories and categories. Example: Category has information: C#, PHP, JS, Python. Subcategory can contain: Logger, String, While Loop. A post table contain posts about "while loop" in PHP language and posts about "while" loop in C#. So, this is a many-to-many relation? Then I have to put middle table in between, but how? Using MySql. I designed a scheme, worked on stored procedures, php but I have to dismiss it all because I'm missing something. I could delete subcategories and stick to only categories and use tags? That is simplier …

Member Avatar
Member Avatar
+0 forum 2

i need help on this project it really makes me crazy... imnising access 2007 and vb6 together in my code im trying to make a report using sql query inner join on access database with aggregate function so sad the result is really bad.... the many to many relation ship with aggregate function gives me the wrong result... Please give me any idea on this... thank you so much on advanced....

Member Avatar
Member Avatar
+0 forum 2

Hello, So I have buttons on my site connected to a PHP code that updates the column "status" in "users" table with a value based on what button you press. This is the PHP script for that: <?php include('functions.php'); $servername = "localhost"; $username = "root"; $password = ""; $dbname = "emildeveloping"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } $id = $_SESSION['user']['id']; if (isset($_POST['108'])) { $sql = "UPDATE users SET status = '10-8' WHERE id='".$id."'"; } if (isset($_POST['107'])) { $sql = "UPDATE users SET status = '10-7' …

Member Avatar
+0 forum 0

I m working on a MLM project in which i have to store member automatically in binary tree form like 1 is root 2 is child of 1 3 is child of 1 Then 4 is child of 2 5 is child of 2 6 is child of 3 7 is child of 3 then 8 is child of 4 and so on ...... I Want to Create a Downline in above Structure. Please Help me. can any body help me

Member Avatar
Member Avatar
+1 forum 81

I have a script that populates a form from MySQL database table row for editing. I'm performing MySQL SELECT and UPDATE via PDO. After editing a particular table row and clicking on the submit button, the table row doesn't update. The following is "modify-course.php": <?php // configuration require("../includes/config.php"); // query admin table to retrieve current admin's profile //select a particular admin by id // query users table to retrieve current admin's profile if (array_key_exists('aid', $_GET)) { // select a particular admin by id $stmt = $pdo->prepare("SELECT * FROM admin WHERE aid=?"); $stmt->execute([$_GET["aid"]]); $admin = $stmt->fetch(); # get admin data if …

Member Avatar
Member Avatar
+0 forum 3

I'm somewhat new to coding websites. I'm trying to have a code where it pulls multiple images from a single database and displays it in a grid, not a table. At the top of my page I have a normal connection to the database. (very sorry about not having a code snippet, I'm new to daniweb and keep having errors when trying to use code snippets.) <div id="grid" class="grid-container"> <?php while ($row = mysqli_fetch_array($query)) echo '<div class="grid-item"> <p>'.$row['images'].'</p> <p>'.$row['project'].'</p> <p>'.$row['summary'].'</p> </div>'; ?> </div>

Member Avatar
Member Avatar
+0 forum 1

Hi, When I was trying to create the IT Request Form and testing it out, I got some problems during the testing. The home page (index.blade.php) ended up getting an error called "Undefined offset: 1", maybe due to the table database problem. ![0TyCAu.png](/attachments/large/4/8730ed8f11be3f5ed672376eee11d83f.png) The checkboxes in the Request Form (requestForm.blade.php) should not be all checked, instead the user has to select a checkbox option. ![0Tyvyx.png](/attachments/large/4/338e30d7d03b784fd3c723e1bf5d80fb.png) Is there a way to fix the form? My IT Request Form project: https://drive.google.com/file/d/1Vpif_1Cxm-Kkw-4_5ZKYt-Tjd1IWJB9_/view?usp=sharing *Please note that the data I entered when testing is fictional (not real).

Member Avatar
+0 forum 0

I would like help with creating a form that when submitted, creates a webpage which is able to be edited by whomever submits the form; I would also like this url/link to be added to a database.

Member Avatar
Member Avatar
+0 forum 1

The End.