Hi guys, This is my first post and so glad to start sharing the knowledge. I am using Mysql database with VB.NET and I have this code : Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim str As String = "Server=localhost;Port=3306;Database=testdb;Uid=root;Pwd=password" Using con As New MySqlConnection(str) Dim query As String = "select * from testdata where rfid_tag='" & TextBox3.Text & "' and Date_serve<= '" & Date.Now.ToString("yyyy-MM-dd ") & "' and Start_Time<= '" & Date.Now.ToString("HH:mm:ss ") & "' and End_Time>= '" & Date.Now.ToString("HH:mm:ss ") & "' or amount_serve='' " Dim cm As New MySqlCommand(query, con) con.Open() Dim rd …

Member Avatar
Member Avatar
+1 forum 1

$query = "INSERT INTO 'user-profiles' ('name', 'avatar', 'description', 'votes', 'pay_methods', 'location', 'user_id') VALUES ('sadj', 'qwesad', 'sadqwdqw', '0','sadsad', 'sadasdsad''4')"; $resultprof = $this -> conn -> query($query); votes and user_id are INT columns, and user_id is a foreign key. Making this insert on mySQL directly it works perfectly, but on my PHP the "success" is false....

Member Avatar
Member Avatar
+0 forum 5

I need help with implementing MySQL transactions with PHP. Specifically, I'm confused between the flags `WITH CONSISTENT SNAPSHOT`, `READ WRITE`, and `READ ONLY`, what their differences are, and how they relate to table locking. I already read the MySQL reference manual but I'm still confused.

Member Avatar
Member Avatar
+2 forum 6

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 20

If a bulk MySQL insert takes 5 minutes to complete, and one of the columns in the table is a TIMESTAMP column with a default value of CURRENT TIMESTAMP, will the timestamps of the rows that were inserted be reflective of the entire 5 minutes, or will they all default to the same timestamp from beginning or the end of the query? The bulk insert exists within a transaction.

Member Avatar
Member Avatar
+0 forum 3

Hi there I am new at this website thanks for every one that help me I have this output appear on the link below: [Click Here](https://ibb.co/fe8Cvf) I want to while I choosing a **Time** **value** this value must be send for these useres that **absence** row the checkbox is **checked** this is my code:

Member Avatar
Member Avatar
+0 forum 3

Hello! I have a problem with a MySQL database that I haven’t been able to solve no matter how much I tried, either with internet guides or with free tools. I really don’t want to pay hundreds of dollars to a company so please, if anyone knows of a solution, help me because I’m desperate. I was running XAMPP 7.1.22 where I had said database and I decided to install XAMPP 7.2.10 without backing up the database. After that, the site wasn’t working so I figured the problem was the database. And indeed PHPMyAdmin wouldn’t recognize it. I reinstalled the …

Member Avatar
+0 forum 0

<?php $msg=""; $image1=""; $image1_err=""; //if upload button is pressed if(isset($_POST['upload'])){ $target="images/".basename($_FILES['image']['name']); $db=mysqli_connect("localhost","root","","categories"); $image=$_FILES['image']['name']; $text=$_POST['text']; if(isset($_POST['electro'])){ $sql="INSERT INTO electronic(image,text) VALUES ('$image','$text')"; mysqli_query($db,$sql); } //move image to a file if(move_uploaded_file($_FILES['image']['tmp_name'],$target)){ $msg="Image uploaded successfully"; }else{ $msg="There was a problem uploading image"; } } ?> <!DOCTYPE html> <html> <head> <title>Image Upload</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="content"> <?php $db=mysqli_connect("localhost","root","","categories"); $sql="SELECT * FROM electronic"; $result=mysqli_query($db,$sql); while($row =mysqli_fetch_array($result)){ echo "<div id='img_div'>"; echo "<img src='images/".$row['image']."'>"; echo "<p>" .$row['text']."</p>"; echo "</div>"; } ?>

Member Avatar
Member Avatar
+0 forum 4

I want to protect my site from hacking. Currently I know about XSS and SQL injection. Do I need to use mysqli instead of mysql? And why? When should I use `htmlentities()` and `striptags()`? I also don't want users to upload melicious files and since I accept file uploading, is it enough to check file type? If not what can I do to prevent this? My website runs on PHP, is there anything else I should worry about?

Member Avatar
Member Avatar
+0 forum 6

Hi, In my application two fields are the user id and user name,i want to show the user name and user id along with other details in a html table. user id is a numeric dropdown menu and user name is text only.How can i show the specfic record in that table for that user which i have selected in both of the fields ,how i can fetch data from backend User table?am using html,css and javascript, Any suggestion would be grateful!Thanks..

Member Avatar
Member Avatar
+0 forum 1

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" id="playermob" required="required"></td> </tr> <tr> <th scope="row">*E-Mail :</th> <td><label for="playermail"></label> <input type="text" name="playermail" id="playermail" required="required"></td> </tr> <tr> <th scope="row">Address :</th> <td><label for="playeraddress"></label> <textarea name="playeraddress" id="playeraddress" cols="45" rows="5"></textarea></td> </tr> <tr> <th scope="row">&nbsp;</th> <td><input type="submit" name="cancel" id="cancel" value="Cancel"> <input type="submit" name="submit" id="submit" value="Submit"></td> </tr> <tr> <th scope="row">&nbsp;</th> <td>&nbsp;</td> </tr> <tr> <th colspan="2" scope="row">&nbsp;</th> …

Member Avatar
Member Avatar
+0 forum 8

<html> <head></head> <link rel="stylesheet" type="text/css" href="style.css" <body> <?php $db = mysqli_connect('localhost', 'root', '', 'formdb'); $formId = ''; $LastName = ''; $FirstName = ''; $Email = ''; $Birthday = ''; $Birthplace = ''; $Comment = ''; if (isset($_GET['upd'])){ $formId = $_GET['upd']; $results = mysqli_query($db, "SELECT * FROM tbl_form WHERE formId=$formId"); } if(isset($_POST['submit'])) { $formId = $_POST['formId']; $LastName = $_POST['LastName']; $FirstName = $_POST['FirstName']; $Email = $_POST['Email']; $Birthday = $_POST['Birthday']; $Birthplace = $_POST['Birthplace']; $Comment = $_POST['Comment']; $query = "UPDATE tbl_form SET LastName='$LastName', FirstName='$FirstName', Email='$Email', Birthday='$Birthday', Birtplace='$Birthplace', Comment='$Comment' WHERE formId='$formId'"; mysqli_query($db, $query); $_SESSION['msg'] = "Successfully Updated!"; header('location: form.php'); //redirect after inserting } ?> <?php …

Member Avatar
Member Avatar
+0 forum 1

hi i make a page for registration and login after that i uploaded image ..i want to show those image by own user id..plz help me..thanks in advance :)

Member Avatar
Member Avatar
+0 forum 1

I am not that much of an expert in PHP as it has been few months since I started playing with it. Currently I am working on creating a basic CRUD operation in PHP. I follow this tutorial on CRUD in PHP (https://www.cloudways.com/blog/execute-crud-in-mysql-php/ ) to create it on a local wamp server. However, I am getting following error: Fatal error: Call to a member function fetch_array () on string in C: \ wamp \ www \ crud_oop \ index.php on line 233 Can anyone point out what I am doing wrong? Here is my full code: <div class="container"> <div style="height:50px;"></div> …

Member Avatar
Member Avatar
+0 forum 1

I have a Table that displays titled and first name columns and delete link on the 3rd column. Unfortunately for a reason i don't understand, records are not deleting when the Delete link is clicked. Please friends, help me figure out what's wrong here. Table <?php $user_id = $_SESSION["user_id"]; //brought here via session //select statement here // output data of each row while($row = $result->fetch_assoc()) { echo '<tr> <td scope="row">' . $row["titled"]. '</td> <td> '.$row["firstname"] .'</td> <td><a href="user_delete.php? delete=$row[user_id]">Delete</a> </td> </tr>'; } } else { echo "0 results"; } ?> user_delete.php code <?php session_start(); require_once $_SERVER['DOCUMENT_ROOT'] . '/soap/includes/server.php'; if(isset($_GET["delete"]) ) …

Member Avatar
Member Avatar
+0 forum 2

Hello, I can't display images from database. I have folder called "images" next to index.php where I keep images. I suppose I have wrongly defined folder path with images or sth else. <?php $connection = new mysqli("localhost", "root", "", "crud"); $sql = "SELECT * FROM test"; $res = $connection->query($sql); if(@$res->num_rows > 0) { while($row = $res->fetch_assoc()) { ?> <img src="<?php "C:/xampp/htdocs/img_mysql/images/".$row['image'] ?>" style="width:170px;height:120px" /> <?php } } ?> I put picture with how look my website when I try display images. ![011.jpg](/attachments/large/4/cb5cff474c596085beba1a63f9b6c6b6.jpg "align-center")

Member Avatar
Member Avatar
+0 forum 3

i am creating an app with android studio and i'm using mySQL.and i want to implement friends feature in my app to enable users send and recieve friend requests, i have created tables and writen the server side php code for that, i have also created an add as friend button that should do that in my app but i'm still unable to write the appropriate code for that in android.your help with this will be highly appreciated.

Member Avatar
Member Avatar
-2 forum 3

Hi, i have a plugin called wp deposits and a template called automotive, i need the client to be able to pay a non refundable fee of 5% which is working fine through wp deposits, the thing is wp deposit is picking price from woocommerce, i want it to pick from another table, or i want woocommerce to get products from another table e.g. the prices should come like, select price from another_table where guid=$_GET['guid']; EDIT: I am new to woocommerce, i have tried researching but havent gotten any resource to help,i went through almost all pages in woocommerce but …

Member Avatar
Member Avatar
+0 forum 4

I'm a newbie in php and I want to create a single login page for Admin and user.When admin log in it should go to an admin page and when user log it shoult go to index page.I want help with my code, it works fine login normal users but i try it addind the admin part and it doesn't seem to work .Please help and Thanks in advance .. This is my validation code for the login <?php if(!empty($_POST)){ if(isset($_POST["username"]) &&isset($_POST["password"])){ if($_POST["username"]!=""&&$_POST["password"]!=""){ include "conexion.php"; $user_=null; $sql1= "select * from user where (username=\"$_POST[username]\" or email=\"$_POST[username]\") and password=\"$_POST[password]\" "; $query = …

Member Avatar
Member Avatar
+0 forum 6

Hello i have a project that uses firebase but i want to make connect to my MySql database on xampp. Any idea what to do?

Member Avatar
Member Avatar
+0 forum 1

hi, I am stuck trying to figure out how to build a table to display agents names, (that I already have, mysql table etc...) but now I need to add columns dynamicaly. I need to add (programs in witch agents are enroled, and a status of the program ( in-progress, not-done, etc). The part that I can figure out is where would I save the status of the agent in the program. I have enroled-agents table: (id, name, email) displays a basic mysql-php-html table; then I have programs table: (id, name, description, avaiable-status) When i place them together, where how …

Member Avatar
Member Avatar
+0 forum 4

I have a database of pictures, and votes. The pictures database has up_votes and down_votes culomns. I want to create a system using MySQL to get hot and trending pictures just like 9Gag. How can I do that?

Member Avatar
Member Avatar
+0 forum 13

I send payments to my users regularly. But sometimes the user enter a PayPal email address that cannot receive money from other PayPal users. They just can receive money from their website. How can I check for this and show an error to the user? Do I need to use PayPal IPN, or API? And how?

Member Avatar
+0 forum 0

Hey, I'm looking to learn more back-end managing as I'm primarily a front-ender. So, maybe you could suggest some learning resources? Idealy free, but I know it's not always possible. I've already completed a couple of courses on the internet mainly https://www.bitdegree.org/course/sql-course and been on YouTube, Google (that's how I ended up here), but couldn't find anything else. Thank you!

Member Avatar
Member Avatar
+0 forum 2

<?php $db = new Db(); $mysqli = Db::$_mysqli; if (isset($_POST['name'])) { $name = escape($_POST['name']); $email = escape($_POST['email']); $phone = escape($_POST['phone']); $password = escape($_POST['password']); $result = array(); /*check email is unique*/ $email_num = $db->GetNum("user","email='$email'"); if ($email_num == 0) { /*insert into database*/ $md5password = md5($password); $insert = $db->Insert("user","'','$name','$email','$phone','$md5password'"); /*success*/ if ($insert) { $result['type'] = "success"; $result['message'] = "Your are Register"; /*login the user in*/ session_start(); $_SESSION['id'] = mysqli_insert_id($mysqli); }else{ /*error*/ $result['type'] = "error"; $result['message'] = "Error Please Try again."; } }else{ $result['type'] = "error"; $result['message'] = "Email Already Register <span class='text-bs-primary'>Please Login</span>"; } if(!$error) { $sql="select * from user where (name='$name');"; …

Member Avatar
Member Avatar
+0 forum 2

This the code in products <?php require_once("inc/header.php"); require_once("inc/navbar.php"); /* if user is logged in then only allow the user to view the page */ if (!isset($_SESSION['id'])){ echo "<h1 class='text-center text-upper text-bs-primary'>please login to view your cart <a class='text-black' href='login.php'>Login</a></h1>"; exit(); } else{ $user_id = $_SESSION['id']; } $carts = $db->FetchAll("*","cart","user_id='$user_id' AND active='y'","`id` DESC"); if (empty($carts)) { echo "<h1 class='text-center text-bs-primary text-25 text-upper'>your cart is empty <a class='text-black' href='products.php'>Go Shop</a></h1>"; exit(); } ?> <div class="container padding-10"> <div id="cart-container-main"> <div class="text-center text-20 text-bold" id="cart-message"></div> <table class="table"> <th>Product image</th> <th>Product detail</th> <th>Price</th> <th>Tax</th> <th>Subtotal</th> <th>Remove</th> <tr> <?php $cod= 0; $main_subtotal = 0; $main_shipping_charge = …

Member Avatar
+0 forum 0

Hello everyone. I want to build a special form. It has different kind of input types text, radio,select and combo boxes. Specility of my need is this. *I need to insert one element value as one record to database. Let's assume there are two textboxes and radio button group. It means three input types. So I want to input these values as 3 records. * I want to keep 3 input values as array. So I named input elements as array. Now I will show my code of one textbox and radio button group below. So you could get idea …

Member Avatar
Member Avatar
+0 forum 1

How i do remove duplicate questions from my excel file??? There are more then 150 questions in my excel file

Member Avatar
Member Avatar
+0 forum 2

$table = "<table>\n"; for ($i = 0; $i < sizeof($rounds); $i++) { $table .= "<tr><th>Week #: " . ($i + 1) . "</th><th>Match</th><th>Away</th><th>Referee</th></tr>\n";//table headers foreach ($rounds[$i] as $r ) {//iterate through an array $table .= "<tr> <td> Day :</td> <td> $r </td> <td>".$r["Away"]."</td><td> </td></tr>\n"; //i want to store values of this table in a database table } }

Member Avatar
Member Avatar
+0 forum 2

I am trying to select all rows from all tables in the database when a column equal a given name. I have like many tables with same structure and columns. I have written this piece of code but it throws an error. SELECT GROUP_CONCAT(qry SEPARATOR ' UNION ') INTO @sql FROM ( SELECT CONCAT('SELECT * FROM `',table_name,'` where Name like ''','sally%','''') qry FROM ( SELECT distinct table_name FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = 'db_customers' AND column_name LIKE 'Name' ) A ) B; PREPARE s FROM @sql; EXECUTE s; DEALLOCATE PREPARE s; This is the error I am getting. I am aware …

Member Avatar
Member Avatar
+0 forum 3

The End.