10,940 Topics
| |
I am currently developing a MLM PHP script, where I need some suggestions OR code examples (would be better) about giving bonus to the all referrers. Like: username referrer -------- -------- A B A // UPDATE USERNAME A WITH +5 POINTS // C B // UPDATE USERNAME A WITH +3 … | |
I'm trying to pass a filename to a function but don't know how to call the function from a click on a link. The top of my index.php is: <?php $filename = NULL; session_start(); // start of script every time. // setup a path for all of your canned php … | |
i am working on local web based system.now i need to install databse(xampp) at one pc and the application at another pc in the same netwoek(html and php code).but how can i connect or configure in both pcs .specially how to onfigure the database connection using php? | |
I have a download page that needs to run a function when clicking on a link. The function is supposed to enter a row in a mysql database table and download the file. I don't know if I've coded the function incorrectly or I coded the onclick incorrectly. Here's the … | |
I have Apache2, php 7.2, and mysql installed. At the top of my index.php I have the following script: <?php session_start(); // start of script every time. // setup a path for all of your canned php scripts $php_scripts = '/home/larry/web/test/php/'; // a folder above the web accessible tree // … | |
[B]Mysql - How to use UPDATE with SELECT???[/B] I have two tables: [B]1) products_category[/B] -cat_id -cat_name [B]2) related_category[/B] -rel_cat_id (exaclty same as products_category.cat_id==related_category.rel_cat_id) -rel_cat_name [B]products_category table[/B] [IMG]http://www.ephpsolutions.com/scud/rrr/product_category.gif[/IMG] [B]related_category table[/B] [IMG]http://www.ephpsolutions.com/scud/rrr/related_category.gif[/IMG] I want to get cat_name from products_category and want to store in rel_cat_name in related_category tabel. and the query should … | |
mysqli_real_escape_string() expects parameter 1 to be mysqli, null $idbilik = " ' ". mysqli_real_escape_string($idbilik, $samb) . " ' "; $result = mysqli_query($samb,"SELECT * FROM bilik WHERE idbilik=$idbilik"); while($res = mysqli_fetch_array($result)) i did as u say so madam...add the line u gave before $result..but i am getting the error stated above... | |
{% for i in coupontesting %} <center> <div class="rectangle"> <span class="right">Store Link</span><span class="left">{{ i.seller_store }}</span> <div class="coupon-frame"> <div class="coupon-left-div coupon-align-center"> <div style="padding: 1.125rem;border-left: 1px solid #d4d4d4;"> <div style="position:relative;"> <div class="coupon-left-img-div text-center coupon-align-center orange pt-32"> <span class="bold-18">{{ i.name }}</span> </div> </div> </div> <div class="coupon-ticket-frame"> <div class="coupon-ticket-frame-style"> <div class="oupon-ticket-frame-line"></div> </div> </div> </div> … | |
I have the following two tables: TABLE 1: +-----------------------------+--------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------------------+--------------------------------------+------+-----+---------+-------+ | patient_id | bigint(20) | NO | PRI | NULL | | | patient_wpid | int(11) | NO | PRI | NULL | | | age_at_visit | … | |
to make our project finish, i need to get the data from the user who just log in(only his/her data) but i dont have any idea how, can someone help me...thank you very much! well appreaciated :) so this is the part where i need to add something so i … | |
Is there any way to backup/dump/export all the databases in one step and vice-versa (import all databases into MySQL) in MySQL ? If yes, then how I can do this..? | |
Am a new aspired web developer who is looking forward to be an expert in due time,in this great community. Thanks | |
can you please help me to answer that problem? This is a question, I have an employee salary table, How do I find the second highest from it.? A big thanks to those who will help. I appreciate it a lot. | |
I am trying to work out how to get data from two different tables in the same database and retrieve the filenames uploaded into the database for a specific ticket id and username. I have been having a go at the php code myself and have managed to INNER JOIN … | |
#Parse error: syntax error, unexpected '$Email' (T_VARIABLE) in C:\xampp\htdocs\test1\connect.php on line 3 <?php if(isset($_POST ["password"]) $Email=$_POST['email']; $password=$_POST['password']; $conn = new mysqli('localhost','root','','test1'); if($conn->connect_error){ die('Connection Failed : '.$conn->connect_error); } else{ $stmt = $conn->prepare("insert into login(email,password) values(?,?)"); $stmt->bind_param("ss",$Email,$password); $stmt->execute(); echo "login Sucessfully..."; $stmt->close(); } ?> | |
I am crafting a code generator for something, and I have encountered some things that I do not know yet. Excuse the scambled eggs in this code, but could you please tell me what a job is, and how to get it to run a stored procedure for me? I … | |
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in F:\xampp\htdocs\ajax\server.php on line 55 // Retrieve comments from database $sql = "SELECT * FROM comments"; $result = mysqli_query($conn, $sql); $comments = '<div id="display_area">'; while ($row = mysqli_fetch_array($result)) { $comments .= '<div class="comment_box"> <span class="delete" data-id="' . $row['id'] . '" … | |
Hello i want to upload an audio file(.mp3). The file is uploaded on the folder, the value is inserted on the db (MySql) so far so good. But when i try to play the file on the uploads folder is says its corrupted or extension is wrong.the value is not … | |
SELECT MAX(Salary) FROM Employee WHERE Salary NOT IN (SELECT MAX(Salary) FROM Employee ) | |
I need a simple external table definition for preforming loads from FIXED WIDTH files. I don't remember how to do External tables in oracle. This would be a Fixed width, not CSV. I am creating a generator and I need the external table definition. | |
here is my table data.. here is my table data.. (4 Columns/1row in mysql table) id bno date results 310 001 02-15-2020 MI,108.53 Oh,194.57 PA,182.22 WA,238.57 How to split(statemiles) single column into (state, Miles) two columns and output like following 5 columns /4rows in mysql using php code. (5 Columns … | |
Hello all. I have a funtion in MYSQL to substruct days from a date. This function seamsto work but some dates it times out. This is my function CREATE DEFINER=`root`@`localhost` FUNCTION `Calculater`(intrval int, req date) RETURNS date DETERMINISTIC BEGIN declare calculated date; declare added int default 0; Lbl_Loop: Loop IF … | |
I have a basic html here, where you could just submit the button through an action page, so it inserts the record into the mysql database in phpmyadmin, what I want to know is how to make it auto submit after 5 mins, while setting the blanks fields value into … | |
<a style="position:absolute;" href='/Superuser/Plantincharge/dashboard.php'>Back</a> <h4 style="position: relative; left:95%;"> <button onclick="myFunction()">Print</button> <script> function myFunction() { window.print(); } </script> </h4> <h3 style="text-align:center; font-family: sans-serif; border-radius: 25px; border: 2px solid #73AD21; padding: 5px; width: 200px; height: 25px; position:relative; left:500px; overflow: hidden;">PROPOSAL No.</h3> <?php //////////////////////////////////////////// // Collecting data from query string $id=$_GET['id']; // Checking data … | |
I used similar process for users to update username and email, but password is giving me a headache <?php if(isset($_SESSION['id'])){ if(isset($_POST['change_password_submit'])){ $usersId = $_SESSION['id']; include 'includes/dbh.inc.php';//connection to database $currentpassword = $_POST['currentpassword']; $newpassword = $_POST['newpassword']; $newpasswordagain = $_POST['newpasswordagain']; $currentHash = password_hash($currentpassword,PASSWORD_DEFAULT); $newHash = password_hash($newpassword,PASSWORD_DEFAULT); if(empty($currentpassword)){ echo '<p id="sorry">Please enter your current … | |
Hello all i am a newbie and i would love to learn from you all. Please help me as i am making a project with phpmysqli where i need to approve a pending status! Here's my code. Kindly help me thanks. <?php //////////////////////////////////////////// // Collecting data from query string $id=$_GET['id']; … | |
I have a database, where I store Job Openings, Where I store Job Descriptions with formats in RichText Box like: bullet points, ordered lists and bold text etc... But when I save data in MySQL Database and Retrive it from Database it comes format less. Can anyone help me regarding … | |
Signup.php <form name="sign-up" method="post" action="process.php?action=sign-up"> <h3><span>Sign-Up</span></h3> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <thead> User Details </thead> <tr> <th scope="row">*User ID :</th> <td><label for="playerid"></label> <input type="text" name="playerid" id="playerid" required="required"></td> </tr> <tr> <th scope="row">*Name :</th> <td><label for="playername"></label> <input type="text" name="playername" id="playername" required="required"></td> </tr> <tr> <th scope="row">*Mobile Number :</th> <td><label for="playermob"></label> <input type="text" name="playermob" … | |
I'm using phpMyAdmin to manage my databases, I have 2 projects that use 2 different database the first one uses 'root'@'localhost' and the 2nd is 'root'@'127.0.0.1' I don't know how i ended up using 2 different server but it was working fine until i tried to edit codes with the … |
The End.