2,570 Topics

Member Avatar for
Member Avatar for prod.

Hi I have this PHP Code - <?php require_once ("../include/initialize.php"); if (!isset($_SESSION['ACCOUNT_ID'])){ redirect(web_root."index.php"); } $action = (isset($_GET['action']) && $_GET['action'] != '') ? $_GET['action'] : ''; switch ($action) { case 'add' : doInsert(); break; case 'edit' : doEdit(); break; case 'delete' : doDelete(); break; case 'photos' : doupdateimage(); break; case 'checkid' …

Member Avatar for AndrisP
0
505
Member Avatar for Gonzalo_3

Hello. I want to start studying the Golang language but I can't find any IDE that I can configure well, can you tell me an IDE that is good for Go and how to configure it (explained for fools in Spanish), please? I have tried with Sublime, Visual Studio Code …

Member Avatar for rproffitt
0
59
Member Avatar for oninchan

Parse error: syntax error, unexpected variable "$sql" in C:\xampp\htdocs\ProjectIT12\LR\controller.php on line 38 <?php include_once ("connection.php"); // connection created succesfullly session_start(); //store all erros $errors=[]; //When sign up button clicked if(isset($_POST['signup'])){ $fname = mysqli_real_escape_string($conn , $_POST['fname']); $mname = mysqli_real_escape_string($conn , $_POST['mname']); $lname = mysqli_real_escape_string($conn , $_POST['lname']); $street = mysqli_real_escape_string($conn , $_POST['street']); …

Member Avatar for pritaeas
0
73
Member Avatar for skymhine

if (count($_FILES) > 0) { if (is_uploaded_file($_FILES['userImage']['tmp_name'])) { $imgData = addslashes(file_get_contents($_FILES['userImage']['tmp_name'])); $imageProperties = getimageSize($_FILES['userImage']['tmp_name']); $sql = "INSERT INTO trial (imageType ,imageData,uploaded_on, user_id,tax_payer_id) VALUES('{$imageProperties['mime']}', '{$imgData}',NOW(),'".$_SESSION['id']."','".$_GET['id']."')"; $current_id = mysqli_query($db, $sql) or die("<b>Error:</b> Problem on Image Insert<br/>" . mysqli_error($db)); $current_id = mysqli_insert_id($db); if (isset($current_id)) { echo "Upload Succesfully"; }else{ echo "There is a …

Member Avatar for Dani
0
45
Member Avatar for nextsmm

Is it necessary to have computer or laptop to test the code? Did you ever seen anyone who can be perfect or master in coding whit cell phone?

Member Avatar for DGPickett
3
234
Member Avatar for skymhine

<?php if (count($_FILES) > 0) { if (is_uploaded_file($_FILES['userImage']['tmp_name'])) { $imgData = addslashes(file_get_contents($_FILES['userImage']['tmp_name'])); $imageProperties = getimageSize($_FILES['userImage']['tmp_name']); $sql = "INSERT INTO qr(user_id,file_name ,QrCode) VALUES('".$_SESSION['id']."','{$imageProperties['mime']}', '{$imgData}')"; $current_id = mysqli_query($db, $sql) or die("<b>Error:</b> Problem on Image Insert<br/>" . mysqli_error($db)); if (isset($current_id)) { header("Location: preview.php"); } } } ?> <form name="frmImage" enctype="multipart/form-data" action="" method="post" class="frmImageUpload"> …

Member Avatar for Dani
0
97
Member Avatar for Drake_2
Member Avatar for skymhine

<?php if(isset($_SESSION['id']) ) { ($_SESSION['id']) { //echo "you're login"; } echo "<form action='upload.php' enctype='multipart/form-data' method='post'> <br>Qr Code: <p><input type='file' name='file' > <p><input type='submit' value='Upload' name='submit'> </form>"; } ?> <?php $statusMsg = ''; // File upload path $targetDir = "qr_code/"; $fileName = basename($_FILES["file"]["name"]); $targetFilePath = $targetDir . $fileName; $fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION); …

Member Avatar for skymhine
0
85
Member Avatar for Nicole_17

I need help..Even after doing extensive research and youtube videos.. I can't seem to get this. This is just for a hypothetical situational based project i'm doing to demonstrate the functionality of storing fake credit card info in a mySQL database from a PHP file. The goal is: Once a …

Member Avatar for Dani
0
172
Member Avatar for misstj555

Hello. I am trying to check if a table definition (the default value on a constraint) is equal to UTC Time by using the following query: IF NOT EXISTS((SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name = 'ModifiedDate' AND object_id = object_id('dbo.WorkflowAudit')) == GETUTCDATE()) However, you can not compare a …

Member Avatar for john_111
0
82
Member Avatar for BB2020

Hi all. i have a trouble of my testing project. could anyone can guide me to solve the problem. million thanks~~ newbie of programming. error : System.Data.SqlClient.SqlException: 'Incorrect syntax near 'card'.' string connectionstring = ConfigurationManager.ConnectionStrings["library2ConnectionString"].ConnectionString; SqlConnection con = new SqlConnection(connectionstring); con.Open(); string sql = "Select librarycardid, password" + "from library …

Member Avatar for pritaeas
0
52
Member Avatar for tauseefpanjwani
Member Avatar for emiliolorenzo30

$sql = "SELECT cl_id, cl_name, cl_service_description, cl_contact, cl_dept,status, expiry_date from contract_list"; $result = $conn-> query($sql); if($result->num_rows > 0) { while($row = $result-> fetch_assoc()) { echo "<td>$row[cl_id]</td>"; echo "<td>$row[cl_name]</td> "; echo "<td> $row[cl_service_description]</td>"; echo "<td>$row[cl_dept]<td>"; echo"$row[status]"; echo "<td>$row[cl_contact]</td>"; echo "<td>$row[expiry_date]</td>"; echo "<td></td>"; echo "<td><div class=table-data-feature>"; echo "<button class='item' data-toggle='tooltip' data-placement='top' title='send'>"; …

0
24
Member Avatar for complete

Where is the SQL Server Database Trigger Wizard or Dialog Box? This question is about SQL Server In the past, I have created a stored procedure that was run on a timely basis by (if I remember correctly) a database trigger. As I recall, there was a wizard (dialog box …

Member Avatar for rproffitt
0
32
Member Avatar for Rishabh_8

I have learning this from youtube,php quiz using ajax. I am facing problem when click on next button after last question it is not redirecting on final page. Please help me to fix this. I think responseText not working. Question.php page to where i display question <script type="text/javascript"> var questionno="1"; …

0
87
Member Avatar for amroasm

How to create sql Query..table_Transaction Ref_No Trn-Date Cust_Code Debit Credit how to create closing balance,Opening Balance Filter by Cust_Code And Trn_Date

Member Avatar for rproffitt
0
24
Member Avatar for Ombu

I want to be able to write an SQL statement that pulls the sum of revenue and expenditure for each day and gets net income for each day with the distinct dates available in the Income and Expenditure tables. I have tried the following statement, but I'm not getting the …

Member Avatar for pritaeas
0
32
Member Avatar for Hammed_1

Hello I have VB.NET System ; I wanna to make setup (.exe) for the program. The Program depend on SQL Server Database. How I can make it exe file with the database, and to install all the configuration on any PC. What I shall do according to the connection string …

Member Avatar for rproffitt
0
47
Member Avatar for Onatola
Member Avatar for Peleg
0
108
Member Avatar for crysmile
Member Avatar for Hayic

<?php $name = $email = $password = $repeatpass = ''; $name = $_POST['name']; $email = $_POST['email']; $password = $_POST['password']; $repeatpass = $_POST['repeatpass']; $con = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $sql = "INSERT INTO user-regis (name, email, password, repeatpass) VALUES ('$name', '$email', '$password', '$repeatpass')"; $result = $con->query($sql); if (!$result) { header("Location: …

Member Avatar for Dani
0
98
Member Avatar for Hayic

<?php require_once './includes/config.php'; $con = new mysqli(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME); $sql = "SELECT * FROM contact-info"; if($result = $con->query($sql)){ while($row = $result->fetch_object()){ //display record 1 by 1 printf(' <tr> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </tr> ',$row->id, $row->name, $row->email, $row->phone, $row->comment); } } printf(' <tr> <td colspan="5"> %d record(s) returned. [ <a href="insert-student.php">Insert Student</a> …

Member Avatar for rproffitt
0
28
Member Avatar for Verlaine

I have an access Database with Chinese and German words. How can I had their audio prononciation wich I get from Forvo or Google translate?

Member Avatar for Dani
0
63
Member Avatar for GLentooth

hi i just came here if theres someone who coudl help me with my problem whenever i add a new user this keeps on appearing\ "INSERT INTO teacher_info (firstname,middlename,lastname,gender,address,date_joined,username,password) VALUES ('John','Doe','Doenut','Male','New york USA','2021-06-11','john','admin') Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of …

Member Avatar for pritaeas
0
234
Member Avatar for Suraj_45

i need to show the image displayed in database but it shows default image <?php $link = new PDO("mysql:host=localhost;dbname=campusdrive", "root", ""); $link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $Sql = "SELECT Image FROM student_form WHERE Sessionid = :Sessionid"; $stmt = $link->prepare($Sql); $stmt->bindParam(":Sessionid", $sessionid, PDO::PARAM_STR); $sessionid = session_id(); $stmt->execute(); $count = $stmt->fetchAll(); if($users = $stmt->fetchColumn()){ echo …

Member Avatar for Dani
0
121
Member Avatar for nalb4242

Hello , i am using free 3 of 9 barcode to create a bar code of each student in my DB , the problem that in my card it is not shown as it is supposed to be but as *98777* ![barCode.PNG](https://static.daniweb.com/attachments/4/73daedb60096264ee7decb34db04e4f4.PNG) so any one knows how i can solve …

Member Avatar for rproffitt
0
99
Member Avatar for Andrea_25

Hi guys. I have just created an intranet in my online store and I'm new at programming so need some help. I'm developing a system that makes this possible: when a user registers, the database detects that they are already a customer who has bought previously and it makes their …

Member Avatar for Dani
1
84
Member Avatar for nalb4242

Hello , mu website objective is to some kind of reposrts the problem when i retrive for example the people in my dtabase under specific age the grid view does not show me all of them i have googled this problem and i found that it can not retrive more …

Member Avatar for pritaeas
0
34
Member Avatar for nalb4242

Hello , i am creating new website using asp net and c# .. what i am basically doing is that i have somedata in my database and will let the user show them in report based on what he is gonna choose to display for example i have in my …

1
92
Member Avatar for varmela

Create a table with following rules and regulations ma 1)Id should b identity 2)Name should allow only starting Letter with a to p 3)city should not allow Chennai,cbe, Salem 4) department should allo only cse,it,ece, 5) college default should b anna university 6) per should above only 70% 7) year …

Member Avatar for Schol-R-LEA
0
61

The End.