10,940 Topics

Member Avatar for
Member Avatar for Dainis_1

<?php error_reporting(0); require 'conn.php'; global $conn; $tablename = $_SESSION['user_id']."_LIETOTAJU_ATIBLDES"; $sql = "CREATE TABLE ".$tablename." ( id INT NOT NULL AUTO_INCREMENT, ATBILDE varchar(255), PATIES varchar(255), PRIMARY KEY (id) )"; if (mysqli_query($conn, $sql)) { } else { } $val = $_GET['QUESTONS']; mysqli_set_charset($conn,"utf8"); $sql = "SELECT * FROM Jautajumi_Prof where TEMAS_NOSAUKUMS = ? …

Member Avatar for twexpresscars
0
78
Member Avatar for discuss
Member Avatar for AndreRet

[ATTACH=RIGHT]20145[/ATTACH][B]Building your first DYNAMIC Database application. This is Part One of a four part tutorial on how to install and use your database, Part Two will teach you how to build successful connections and Part Three will teach you how to build database interaction and management of your databases.[/B] There …

Member Avatar for twexpresscars
1
2K
Member Avatar for sols4comp

Hi All, I am having an issues with an SQL query and I can't quite work out how to resolve it. I have searched Google for the answer but can't seem to find the solution there either. Basically I have a database andin one of the tables it has a …

Member Avatar for pritaeas
0
111
Member Avatar for Mohd Irfan

// To protect MySQL injection for Security purpose $stmt = $conn->prepare($SQuery); $stmt->bind_param("i", $user_id); $stmt->execute(); $stmt->bind_result($fullName); $stmt->store_result(); if($stmt->fetstmt->store_result() ch()) //fetching the contents of the row

Member Avatar for pritaeas
0
48
Member Avatar for yjz07763

I'm utilizing phpMyAdmin to deal with my information bases, I have 2 tasks that utilization 2 diverse data set the first uses 'root'@'localhost' and the second is 'root'@'127.0.0.1' I don't have the foggiest idea how I wound up utilizing 2 distinctive worker however it was working fine until I attempted …

Member Avatar for rproffitt
0
23
Member Avatar for Emeka_2

Hi all,` The below code is giving me problems. <?php $ddaa = $pdo->query("SELECT id, stockname, stockno, producer FROM storemaster order by stockname");; while ($data = $ddaa->fetch(PDO::FETCH_ASSOC)) { echo '<option value="'.$data['stockno'].'" data-producer="'.$data['producer'].'"> '.$data['stockname'].'</option>'; } ?> This is the script: <script> $('#stockname').on('change',function(){ if($(this).val() !=0){ $('#stockno').val($(this).val()); $('#producer').val($(this).attr('data-producer')); } }); </script> All I wanted …

0
48
Member Avatar for Ddd_1

Hello Guys, I'm a beginner in web developing and currently building a website for my assignment.In the website,i have to create a form that allow user to upload multiple images in multiple field. My problem is when user upload the first images,they can't proceed to upload the second images and …

0
181
Member Avatar for SimonIoa

Hello i have a Mysql statement that supposes to return to results. The statement is SELECT c.user_one,c.user_two,c.c_id,r.reply FROM conversation_reply r JOIN conversation c ON r.c_id_fk = c.c_id WHERE c.user_one = '3' OR c.user_two = '3' GROUP BY r.reply I have only two records in the table so the result should …

Member Avatar for pritaeas
0
31
Member Avatar for 343divyankjain

Hello, I wanted to make a unique UI for My website, which should be look like https://www.beyoung.in/ This website. provide me a valuable suggestion.

Member Avatar for rproffitt
-1
72
Member Avatar for Dainis_1

<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); session_start(); if (isset($_POST['delete_account'])){ require 'conn.php'; global $conn; $password = $_POST['delete_password']; $email = 'delete@gmail.com'; $user_id = '5'; $sql = "SELECT * FROM user_acounts WHERE e_pasts=?;"; $stmt = mysqli_stmt_init($conn); // Inicializācija if(!mysqli_stmt_prepare($stmt, $sql)){ header ('location: userpanel.php?error'); exit(); }else{ mysqli_stmt_bind_param($stmt, "s", $email); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); } …

0
39
Member Avatar for larry29936

I have the following query which has died after running over an hour on my local mysql 8 server: UPDATE download LEFT JOIN lookup ON download.ip_address between lookup.start_ip AND lookup.end_ip SET ref = ( SELECT lookup.id FROM lookup WHERE download.ip_address between lookup.start_ip AND lookup.end_ip); All ip fields are IPV4 and …

Member Avatar for pritaeas
0
272
Member Avatar for Xozz

Hi. I'm trying to write a game in PHP. Now a weird item shows up in my database. http://www.leondegroot.nl/files/mysql_nieuw.png "Nieuw" means "New". Do you have any idea what this is and how to delete it? Thanks, Leon

Member Avatar for Xozz
0
77
Member Avatar for duptiagnas

hi guys hope you are well, i on progress for making website but i have a problem with array and looping, how to stop looping when all data has been output. <form method="POST" action="storedata_g6b.php"> <table class="table"> <thead class="thead-dark"> <tr> <th class="col-3">id</th> <th class="col-7">nama</th> <th class="col-3">rank</th> </tr> </thead> <tbody> <?php $rank_b …

0
49
Member Avatar for lewashby

ERROR 1054 (42S22): Unknown column 'Firstname' in 'field list' I'M gettin the above error when I enter: mysql> insert into people (fname, lname) -> VALUES (Firstname, Lastname); Here's the table: mysql> desc people; +-------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+---------+-------+ | fname …

Member Avatar for Dani
0
13K
Member Avatar for FoxyBit

Hi all, I have been confusing myself for days over this so bear with me if it gets a bit confusing. I have a table called tags with columns id, name which list all unique tags (linux, php, mysql, etc.). And I have an array that includes some tags that …

Member Avatar for pritaeas
0
124
Member Avatar for Aeonix

$stmt = $dbconn->prepare("SELECT * FROM `members` WHERE username=? AND password=?"); $stmt->bind_param("ss", $username, $password); Is what I have. Database is connected etc. How can I set variable called `$dbresult` with array of SQL result? I don't want to set individual variables. I really need an entire array as answer. There's couple …

Member Avatar for jkon
0
3K
Member Avatar for mexabet

I have two MySQL tables, which I want to SELECT using a single PDO query and positional placeholders. I've been going through similar questions here to find a solution, but none seems to match the issues I'm having. The following code is the section of my script: <?php // query …

Member Avatar for mexabet
0
966
Member Avatar for sols4comp

I have created a php form that connects to a MySQL database. This is working fine however I have added validation and this doesn't appear to be working correctly and still posts to the results to the database regardless of if they are validated or not. Any ideas?

Member Avatar for Dani
0
150
Member Avatar for Sahilsahni

please if anyone could tell me, how it would be possible, i want to save the content of a uploaded word document in database field with php, no problem with encrypted file like ( ´V z2Ö<Ö<ôÿÿÿÿÿÿ·üü?????ÿÿÿÿSSS8‹DÏLS¥9à1) as it shows if you open a word document in a browser. just want …

Member Avatar for ishu_1
0
4K
Member Avatar for savedlema

Peace be with you! I have been developing apps with VB.NET (old fashion??), upon deployment, all my apps connect to a mysql database server by also installing a mysql database server and of course, mysql db connector to other computers together with the app. But, I can see there a …

Member Avatar for rproffitt
0
72
Member Avatar for Sananil

I have set up for users online but some users showing always online . can you help anyone this my code ![zzz.png](https://static.daniweb.com/attachments/4/810ade1e5592a68b47aee955adb8de8f.png) <?php if ($Row->logged_in == '0') { if ($Row->last_login != '0000-00-00 00:00:00') { ?>Last Login : <?php echo date('d M Y ,H:i A', strtotime($Row->last_login)); } else { echo "<span …

Member Avatar for Emmason
0
434
Member Avatar for Sananil

Hi all. I am having one chat script which I used for my site. It was working fine with mysql database. Then after updated PHP 7 with mysqli then suddenly stopped for working. I need to make the code work with PHP 7 + mysqli. Please help me it was …

Member Avatar for Dani
0
269
Member Avatar for mexabet

I'm trying to redirect user to "**userinfo.php**" after successful registration, but the browser terminates the redirection because it goes into endless loops. Moreover, I need your insight on if the script is secure or not. I need your help, please. Thanks. The following is the "**register.php**" script: <?php // include …

Member Avatar for Dani
0
355
Member Avatar for mexabet

I'm struggling to build a PHP registration script using PDO prepared statements with positional placeholders. But the MySQL queries don't execute. `var_dump();` doesn't display any error. Please, I need your help to fix this. Your time and input are much appreciated in advance. Thanks. **register.php:** <?php // include configuration file …

Member Avatar for rproffitt
0
626
Member Avatar for Sponge_2

images = [createProductForm.productImageModel.data, createProductForm.productImageModel.data] for image in images: if image.filename == '': print('Image must have a filename') return redirect(url_for('createProduct')) if not allowed_image(image.filename): print('Image extension is not allowed') return redirect(url_for('createProduct')) else: filename = secure_filename(image.filename) file_path = image.save(os.path.join(app.config['IMAGE_UPLOADS'], filename)) print(mysql.format(file_path)) mysql.connection.commit() print("Hello yes!") print("images saved") If i were to convert the image …

0
32
Member Avatar for Sponge_2

Hi, How do i store files into blob datatype into mysql via user input with python? def read_file(filename): #Convert digital data to binary format with open(filename, 'wb') as f: photo = f.read() return photo @app.route('/createProduct', methods=['GET', 'POST']) def createProduct(): createProductForm = CreateProductForm() msg = '' if request.method == 'POST' and …

Member Avatar for AndreRet
0
647
Member Avatar for Thanigaivel_1

Greetings to everyone, I am working as a freelance web developer, i have more than 4 years experience in osclass scripts. I am working in the osclass scripts for the past 4 years and have created nearly 67 sites in osclass, and have created many plugins, cuztomized themes, plugin cuztomizations …

Member Avatar for Mcqs
1
341
Member Avatar for texelbee

I am a nyophyte to PHP, and I've seen this answered so many different ways that it is confusing. I have a combobox that is dynamically populated from a MySQL table ACTIVE in a database AIRCRAFT. Based on the selected AIRCRAFTREGISTRATION value from the combobox, I want to find and …

Member Avatar for Biiim
0
307
Member Avatar for Mimi_3

I have being passing across this word above without knowing the meaning, please someone should come up with an answer.

Member Avatar for rproffitt
0
30

The End.