Hello everyone. First of all apologies for my english. It is not my native languate and also if i break any good practice. It is my first Post. I'm triying to learn CGI programming in C. Just for learn purposes and i have been triying litle step by step tests. First i did the hello world and it worked, then i made the CGI read a data file in a folder outside the cgi-bin but inside the /var/www. I'm working on an Amazon Ec2 instante with Amazon Linux (i think is some kind of CentOS). I think my Apache is …

Member Avatar
+0 forum 0

Hello guys, i've the following table in database : IdCity int CityName nvarchar(20) it has the data like this in it : IdCity CityName 1 Абакан 2 Азов 3 Александров 4 Алексин 5 Альметьевск 6 Анапа when i try to run the following view SELECT IdCity, CityName FROM dbo.City WHERE (CityName = 'Абакан') i get the results null, althought that record in the table i tried to add a record with cityname= 'abc' and ran the view with this parameter, it worked fine so it only doesn't get results written in russian any ideas? SQL query problem with any language …

Member Avatar
Member Avatar
+0 forum 3

Hi I have this script to show items in the database. but it is not showing the results. Pls can anyone help? <html> <div><br/><center><h2><font face="Lucida Handwriting" size="+1" color="#00CCFF">Casual Shirts</font></h2></center></div> <div style="width:100%;float:left" > <?php include("config.php"); $dress=$_REQUEST['dress']; $catg=$_REQUEST['catg']; $subcatg=$_REQUEST['subcatg']; $sel=mysqli_query($conn,"select * from items where catg='$catg' and subcatg='$subcatg'"); echo"<form method='post'><table border='0' align='center'><tr>"; $n=1; while($arr=mysqli_fetch_array($sel)) { $i=$arr['itemno']; if($n%4==0) { echo "<tr>"; } echo " <td height='280' width='240' align='center'><img src='admin/itempics/$i.jpg' height='200' width='200'><br/> <b>Item No:</b>".$arr['itemno']. "<br><b>Price:</b>Rs&nbsp;".$arr['price']. "<br><b>Description:</b>".$arr['desc']." <br><br><a href='index.php?con=12 & itemno=$i'><img src='images/MetalPlakDa5new.gif' width='70' height='20'/></a> <a href='index.php?con=14 & itemno=$i'><img src='images/view7.jpg' width='70' height='20'/></a> </td>"; $n++; } echo "</tr></table> </form>"; ?> <div><br> <marquee behavior="scroll" dir="ltr" align="absbottom"><img src="usepics/logo5.jpg" width="100" height="70"/> …

Member Avatar
Member Avatar
+0 forum 1

this is my script but cannot connect. errot message error . user root has no password. I have created databse using phpmyadmin Warning: mysqli_connect(): (HY000/1049): Unknown database 'shop' in C:\wamp64\www\online_shopping\admin\index.php on line 4 pls help <?php //error_reporting(1); //include("config.php"); $conn=mysqli_connect("localhost","root","", "shop") or die(mysqli_error()); extract($_REQUEST); if($_REQUEST['sub']) { $name=$_REQUEST['t1']; $pass=$_REQUEST['p1']; $sel=mysqli_query($conn,"select name, pass from details where name='$name '"); $arr=mysqli_fetch_array($sel); if($arr['name']==$name and $arr['pass']==$pass) { session_start(); $_SESSION['eid']=$name; header("location:home.php"); } else { $er="name and password do not match"; } } ?>

Member Avatar
Member Avatar
+0 forum 2

Hello, I need some help from experts. I am testing a site I have created. I have an issue with login system. It worked fine using XAMPP on my computer but when I uploaded to a live server, login has been a problem. This is what I get when I try to login. "The page isn’t redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies." The login script is below <?php if(isset($_POST['login-submit'])){ include 'dbh.inc.php'; …

Member Avatar
Member Avatar
+0 forum 3

Hello everybody I'm creating a Windows Desktop App using vb.net, I'm not very knowledgeble and I can say that I'm still a beginner. So I have this project where I'm trying to create a report form using ReportViewer where as after putting the ReportViewer control to my form and select the rdlc file and datasource this error suddenly pops up: *"Could not load file or assembly 'MySql.Data, Version=8.0.17.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"* This only shows whenever I try to add a reportviewer …

Member Avatar
Member Avatar
+0 forum 1

I have three tables(table, table2,table3). From table1 i want to return three rows: Title, Desc,time,'products' AS type From table2 i want to return three rows: group_title, group_desc, created,'groups' AS type From table3 i want to return three rows: name, occupation,birth,'users' AS type $sql = "SELECT DISTINCT * FROM (SELECT table1.title, table1.desc, table1.time,'products' AS type FROM table1 ORDER BY rand() LIMIT 5) AS T UNION ALL (SELECT table2.group_name,table2.group_desc,table2.created,'groups' AS type FROM tabl2 JOIN table1 ON table2.id = table1.id ORDER BY rand() LIMIT 5) UNION ALL (SELECT table3.name,table3.occupation,table3.birth,'users' AS type FROM table3 JOIN table1 ON table3.id = table1.id ORDER BY rand() LIMIT …

Member Avatar
Member Avatar
+1 forum 5

Hi all at Daniweb, I'm quite new to PHP and I'm banging my head over this... query 1 WORKS: **$query = "CALL procedure_is_a_great_way_to_let_db_do_some_work('1','6')";** //both 1 and 6 are IN parameters! query 2 DOESN'T WORK: $id_pictures = 1; $id_names = 6; **$query = "CALL procedure_is_a_great_way_to_let_db_do_some_work('".$id_pictures."','".$id_names."')";** //both 1 and 6 are IN parameters!

Member Avatar
Member Avatar
-1 forum 2

I come across this problem every so often and end up having to do work arounds when I would prefer to keep it in the database. I have a query where the data in the query updates frequently so the query won't stay in the cache but I don't need the query to be accurate. I was trying to avoid adding an extra step of storing the data in a temp table and having to update it on a timer. Does anyone know of a way to get MariaDB or MySQL to Keep the result set for a period of …

Member Avatar
Member Avatar
+1 forum 11

Really hoping someone can help me out or point me in the right direction. This is my first ever post in a coding forum so I apologize in advance if I’m breaking any forum rules. I already have a bunch of php code sorted from modifying web resources. I need help altering it further to help me accomplish my goals. Below I’ve included my code, along with screenshots of the code executed in a browser and my MySQL database table. Background: I’m a professional musician but I have extremely basic computer programming knowledge. Nothing formal.. I use google, YouTube, Forums, …

Member Avatar
Member Avatar
+0 forum 2

Hello, I'm quite nub in web development, so be gentle please. If this place is wrong for such problems point me to a more appropriate resource please. To became more familiar with web-programming I found good (as I thought) area for self-improvement. One of my friends owns web project. This project was developed during last 15 years with one programmer who seems to be slightly tired and probably is needed for backup. I've tried (for the very beginning) copy all stuff to the new development environment and found that project consists of several tens of sites: site1.domain.name, site2.domain.name, etc. So …

Member Avatar
Member Avatar
+0 forum 1

Now every web developer need a local web development envoiurment but i don't know how to set up Full-Stack ASP.NET Web Developmental Environment. any one can here to explain me.

Member Avatar
Member Avatar
+0 forum 4

hi everyone. can you help me to check why this error occur and how to fix it? when i want to insert the data, this error is coming out and data not insert into database. <?php define('DB_SERVER','localhost'); define('DB_USER','root'); define('DB_PASS' ,'root123'); define('DB_NAME', 'ems'); $con = mysqli_connect(DB_SERVER,DB_USER,DB_PASS,DB_NAME); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } //code for visitor registration if (isset($_POST['register'])) { $vname = $_POST['ems_visitor_name']; $vage = $_POST['ems_visitor_age']; $vgender = $_POST['ems_visitor_gender']; $vmaritalstat = $_POST['ems_visitor_maritalstatus']; $vnationality = $_POST['ems_visitor_nationality']; $vcontactnum = $_POST['ems_visitor_phonenumber']; $vemailadd = $_POST['ems_visitor_email']; $msg=mysqli_query($con,"insert into ems_visitor(ems_visitor_name,ems_visitor_age,ems_visitor_gender,ems_visitor_maritalstatus,ems_visitor_nationality,ems_status_phonenumber,ems_status_email) values('$vname','$vage','$vgender','$vmaritalstat','$vnationality','$vcontactnum','$vemailadd')"); if($msg) { echo "<script>alert('Visitor register successfully');</script>"; } …

Member Avatar
Member Avatar
+0 forum 1

I let users earn money through my site, and I want to record their daily earnings. I want to record their earnings starting from 00:01am I don't know how to do this using PHP and MySQL. I know how to create, update, etc database. But I am streuggling with PHP time. I don't know how to create a database row for each user at the start of the day and then update their earnings until the end of the day. Here is what I have come up with ... <?php $time = '00:01'; $day = 11; $month = 3; $year …

Member Avatar
Member Avatar
+0 forum 5

I am trying to set up a json object.array to retrieve the data from this mysql query. the data required is posted from java and that seems to work fine, but I get parsing errors. I tried testing the php file and I get the "Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\GetVerse.php on line 8" . previously I had a ';' at the end of the sql query and it said unexpected ';' at the end of line 7. now it i get the error message for line 8: $row = mysql_fetch_array($result); . What seems to be the problem? …

Member Avatar
Member Avatar
+0 forum 11

Hello, I am new to this site and to php and mySQL...and I need some help. I know this topic is all over the web but after a couple of days of looking and refering to several text books it still doesn't work so please bear with me. I have created a web page with an associated mySQL database for our local women's golf club. I am trying to create a routine that will allow active members to get a web page displaying a listing of other members who live near them (in the same city/town). I have created a …

Member Avatar
Member Avatar
+0 forum 2

Hi all, I wanted to procedure to return number of days and weekdays between two dates. This is what I came up with and it seems to work ok, but I'd like to read what others think. And if there's already a single line function for this, oops. Also, I'm not too comfortable with when to use @variable or just variable. Thanks. DELIMITER $$ CREATE PROCEDURE `DATEDIFF_WEEKDAYS`(IN `IN_from_date` DATE, IN `IN_to_date` DATE) BEGIN DECLARE TOTAL_WEEKDAYS INT DEFAULT 0; DECLARE TOTAL_DAYS INT DEFAULT 0; DECLARE FROM_DTE DATE DEFAULT NOW(); DECLARE TO_DTE DATE DEFAULT NOW(); DECLARE CURR_DTE DATE DEFAULT NOW(); IF(IN_from_date = …

Member Avatar
Member Avatar
+0 forum 3

this is may code on adding or saving image in to mysql DB Private Sub SAVECATEGORY_Click(sender As Object, e As EventArgs) Handles SAVECATEGORY.Click If PictureBox1.Image Is Nothing Then MessageBox.Show("Please Insert image ") addcategoryclear() 'you call ddcategoryclear() to clear textbox and picturebox ElseIf TextBox1.Text = "" Then MessageBox.Show("Please Insert Image Name") addcategoryclear() 'you call ddcategoryclear() to clear textbox and picturebox Else Dim ms As New MemoryStream '...........need to Imports System.IO from general PictureBox1.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Png) ' ........save IMAGE cn.Open() Dim command As New MySqlCommand("INSERT INTO `category`( `IMG`, `NAME`) VALUES (@IMG,@NAME)", cn) With command.Parameters .Add("@IMG", MySqlDbType.Blob).Value = ms.ToArray() .AddWithValue("NAME", TextBox1.Text) End With If …

Member Avatar
Member Avatar
+0 forum 9

New to this site I would like to say hello. My main interest is programming in cpp and especially the use of the Standard Template Library and std:: stuff. More than willing to look into any questions from the community. Perry.

Member Avatar
Member Avatar
+1 forum 3

I have developed a game for android mobiles ["Rise Up Air Balloon"](https://play.google.com/store/apps/details?id=com.abacus.riseup). I want to updatte it. Kindly suggest me something if it is better to update https://lh3.googleusercontent.com/rB-fPEBiaGzT_ubSzCtSfftC4pKkIm5buAS2_DhQz4_exYFCrjbcN2T1NhkmM0A3Jj0=s180-rw

Member Avatar
Member Avatar
+2 forum 3

![help1.png](/attachments/large/4/f82a18611583d3d8a689ee71b5a6bc3b.png) it hard for me to explain what the problem, but the thing that i need your help is , how to retrieve the ID to listview, im trying to create a POS project like on restaurant or fastfood store, in the listview it will retrieve image ang name, but if listview is click the image will copy to picturebox, the name will copy to textbox1 and the ID will copy to textbox , use the ID the name and picture can be change to update, please help me how to get the ID

Member Avatar
Member Avatar
+0 forum 8

Hello guys , can you help me how to get the ID from mysql DB , if the listview is click the name and the ID well retrieve to textbox1 and textbox2, i dont know how to get the ID?, on the listview the ID wasnt retieve , can you help me how to retrieve the ID from db

Member Avatar
Member Avatar
+0 forum 3

<form class="nice-form" action="" method="post"> <?php session_start(); // echo "<script>console.log('test')</script>"; // echo "<script>console.log(".var_dump($_SESSION) .");</script>"; // echo var_dump($_SESSION); // echo var_dump($_POST); include("../connection.php"); if (isset($_POST['action'])) { if ($_POST['action'] == "assign_user") { $doorId = $_POST["door"]; $username = $_POST["username"]; $approverId = $_SESSION["id"]; // echo var_dump($_POST); $sql = "SELECT * FROM user WHERE id = '$username' "; // $sql = "SELECT * FROM door_permission WHERE door_id ='$doorId' and user_id = $userId "; // echo $sql; $result = mysqli_query($connection, $sql); // echo var_dump($result); $row = mysqli_fetch_assoc($result); // echo var_dump($row); $userId = $row["id"]; if (mysqli_num_rows($result) > 0) { $sql = "REPLACE INTO door_permission (door_id,user_id,approver_id,status) VALUES ('$doorId','$userId','$approverId','allow')"; //echo $sql; …

Member Avatar
Member Avatar
-1 forum 1

I am using bootstrap modals, when i query to populate a dropdown to fill in to my form, my query is show all but the first record and i can't figure out why. My form looks like this <div class="form-group"> <label for="deptcode">Department</label> <select class="form-control" id="deptcode" name="deptcode" value="<?php echo $mem['deptcode'];?>" <?php $departments = $mysqli->query("Select * FROM department ORDER BY deptcode"); while ($dept = mysqli_fetch_assoc($departments)){ $tempdeptname = $dept['deptname']; $tempdeptcode = $dept['deptcode']; //see what the current name is and display it first if ($tempdeptcode == $mem['deptcode']) echo "<option value='$tempdeptcode' selected='selected'>$tempdeptcode ($tempdeptname) </option>\n"; else //if blank display first item in dropdown list echo "<option …

Member Avatar
Member Avatar
+0 forum 1

I am working on an app where a user registers and its passed to the server where there information is added to the database. It passes various checks along the way but ails to add the user. Code below: <?php $con = mysqli_connect('localhost', 'root', 'root', 'eat4lessaccess'); //check connection if(mysqli_connect_errno()) { echo "1: Connection Failed"; //Error code 1 = connection failed exit(); } $username = $_POST["username"]; $password = $_POST["password"]; $name = $_POST["name"]; $email = $_POST["email"]; $phone = $_POST["phone"]; //Check username exists $usernamecheckquery = "SELECT username FROM useraccounts WHERE username='" . $username . "';"; $usernamecheck = mysqli_query($con, $usernamecheckquery) or die("2: Username Check …

Member Avatar
Member Avatar
+0 forum 2

hello, im going to create POS project, can you help me how to retrieve all image from mysql db to listview, so that i can view all image that i save to my db, i already save image and use sreach button on retrieve image from db to picturebox. thank you guys . the code below is not retrieving image from db to listview, but if you click listview it will retrieve image from db to picturebox Dim constr As String = "Data Source = localhost; User ID = root; Database = chamchamber" Dim cn As MySqlConnection Dim cmd As …

Member Avatar
Member Avatar
+0 forum 8

I need help on a new problem. On my women’s golf club web site I have a Members Directory page which consists of a table, 5 columns in width, and enough 2 rows sets to hold the members photo in the odd numbered rows with the members name in the even numbered rows. Visually it looks like; ![table1.jpg](/attachments/large/4/d2d953554cd2e5f4daecf07677c9cd88.jpg) We currently have around 53 members which means the table contains 22 individual rows (11 sets of 2 rows). The directory is sorted by last name, so when ever a new member joins a laborious cut and paste process takes place to …

Member Avatar
Member Avatar
+0 forum 1

Heres a pic of my database table ![Screen_Shot_2019-11-16_at_2_35_54_AM.png](/attachments/large/4/0749479693675147a0ccc8219b89e87f.png) Im trying to create a search page with drop down selectors to filter through each of the last 8 columns. I want the the drop down selectors to be able to select multiple entries (I have this working already) I also want them to preload values from data already entered into my table columns. (I also got this working with the help of tutorials... although I admit I don't fully understand how this part works) Using these tutorials i've created a php page that contains 8 drop down selectors that automatically pull …

Member Avatar
+0 forum 0

Here is a basic question, what is the fastest way to transfer a MySQL database? Here are the variables at play: 1) Database is just shy of 3GB 2) Transfer is between two servers running different versions of MySQL 3) There will not be usage of the database during transfer, I can even shut down MySQL if needs be. 4) The database is mostly MYISAM but with a few InnoDBs and a couple Memory (VBulletin) 5) Both servers are Linux based and I have root access on both. I've done the transfer using a mysql dump, but the import took …

Member Avatar
Member Avatar
+0 forum 15

DaniWeb was written in Codeigniter, and when posting to the forums, we use database transactions that look like this: $this->db->trans_start(); ... insert into the posts table ... ... update the member's post count ... ... update the tags table ... etc $this->db->trans_complete(); On occassion, the error log will show for a particular query within the transaction: *Query error: Deadlock found when trying to get lock; try restarting transaction - Invalid query* When that happens, the entire transaction is rolled back. However, this is not ideal because when someone attempts to make a post, we don't want it to completely fail …

Member Avatar
Member Avatar
+1 forum 10

The End.