|
This is the scenario: **User A:** Access the website and choose a questionnaire. The questionnaires are separated on different pages in the same domain, for example: **Home:** "surveys.com" **Questionnaires:** "surveys.com/type1" "surveys.com/type2" After choosing one, he (**User A**) puts the following information: **1** = Recipient's email **2** = His email And then submit. **User B:** Person who received this link to the questionnaire (surveys.com/type1). **What I want to do is:** When **User B** accesses the link to the questionnaire page, it is already programmed to send responses to **User A** who left his email on the home page. My idea was … |
0
34
|
||
|
Rick is really fond of fruit juices, but he is bored of their traditional flavours. Therefore, he has decided to mix as many of them as possible to obtain something entirely new as a result. He has N glasses, numbered from 0 to N-1, each containing a different kind of juice. The J-th glass has capacity[J] units of capacity and contains juice[J] units of juice. In each glass there is at least one unit of juice. Rick want to create a multivitamin mix in one of the glasses. He is going to do it by pouring juice from several other … |
0
95
|
||
|
Hi. I'm trying to set up an AMP system on my machine. It's called UwAmp. Anybody there to tell me how to setup the MySQL in this thing? Thank you |
0
86
|
||
|
Link in MySQL: https://wahlburgers.com/dorchester Variable loaded: $website = $row["website"]; How can I echo the word "Website" as a hot link to $website ( https://wahlburgers.com/dorchester ) inside an HTML form? This is what I've tried: <input type="text" id="website" name="website" value="<?php echo "<a href= '" . $website . "'>" . "Website" . "</a>"; ?> "> Thanks . . . |
1
78
|
||
|
Good morning, I state that I am a beginner, I kindly need help from you. I made a page containing a form that submits data to a database. Everything works perfectly. I would now need to send the data to my email address at the same time. The form contains name, email, text1 text2 and text3. I have tried in every way but without getting any results. Thanks everyone for the help. A favor to be very simple in the explanation, just because they are at the first steps. |
0
69
|
||
|
Good day, I am actually a young programmer, who wants to develop a webpage that enables someone to take a practice test. It was given to me as an assignment that determines if I will remain a programmer. I know little about PHP codes but none in Mysql. I came to the website and noticed a discussion from @broj1 with another programmer. I don't have a code in mind yet or how I should start about it but I would a really appreciate a little help. All I have been able to do is a direct html quiz and the … |
0
114
|
||
|
I have 3 radio buttons on my form A , B , C but when i clicked on A radio it shows specific dropdown which get data from database table but by fruitid 1 and when i clicked on B it will show data fruitid 2 as onnword. i need to show table data by specific fkid Id. Table name--ABC id| fruitid | name 1 | 1 | Apple 2 | 1 | Mango 3 | 2 | Veg-1 4 | 3 | Juice-1 ////////////////////////////////////////////////////////////////// <select> $getdata = mysqli_query($conn, "SELECT * FROM `ABC` WHERE `fruitid`= '$fruitid'); if(mysqli_num_rows($getdata) > 0){ while($data= … |
0
114
|
||
|
I am attempting to update my accounts table for the current session ID with the data posted from a form. My first prepare statement is functioning fine and can be seen functioning through the placeholder variables in the form. It is my second prepare statement that doesnt seem to be working. From what I can tell, form doesn't seem to be posting the data correctly and I am unsure what the error is. It may very well be a simple error but I am stuck. Any help would be massively appreciated! <?php if(!isset($_SESSION['account_loggedin'])) { header("Location: index.php"); } $pdo=mysqli_connect("localhost","root","root","shoppingcart_advanced"); if(!$pdo) { … |
0
52
|
||
|
What is a “MIME type”, what does it consist of, and what is it used for? can anyone pls provide with example? |
-1
63
|
||
|
I am trying to get user's information and show them in user's profile. And i found this query but it is in PDO and my work is in sqli here the query : if(isset($_SESSION['user'])){ $getuser=$con->prepare("SELECT * From users where username=?"); $getuser->execute(array($sessionuser)); Sinfo=$getuser->fetch(); And here the whole code <?php session_start(); $sessionuser=''; if(isset($_SESSION['user'])){ $sessionuser=$_SESSION['user']; } if(isset($_SESSION['user'])){ $getuser=$con->prepare("SELECT * From users where username=?"); $getuser->execute(array($sessionuser)); Sinfo=$getuser->fetch(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title></title> </head> <body> Username:<?php echo $info['username']?> Email:<?php echo $info['email']?> Register Date:<?php echo $info['reg_date']?> Password:<?php echo $info['password']?> </body> </html> <?php }else{ header("Location: login.php"); } ?> |
1
47
|
||
|
When I access an api. it returns data in below format **n2035014,25 N2035014,25 B2035014,2944.40,250,3787.30,2400** o24,22971.20 h24,23064.15 l24,22641.40 c24,22945.05 i24,22744.40 I am clueless how to map these data and store in mysql table. First set of data highlited in bold is dataset 1, followed by second set of data which has a prefix that needs to be mapped from below reference table. And above is just an example output, usually it will have 500 such dataset. i=current value B=bid o= open h=high l=low c=close I want to store something like this stock code | Current Value | Open | High | … |
0
39
|
||
|
Hello i want to automatically add an id to the inserted row on my table in Mysql db. The table has no uniquie key and no AUTO_INCREASMENT. I just want a function to add the id automatically when the row is inserted. This is the statement i have $db = getDB(); if(isset($cId)) { $cId = $request->post('cId'); } else { $cId = '3';**//Here i want to put a new id ** } $insert = array( 'c_id' => $cId, 'user_one' => $uid, 'user_two' => $recieverId, 'ip' => $_SERVER['REMOTE_ADDR'], 'time' => date('Y-m-d H:i:s'), ); $sql = "INSERT INTO conversation (c_id,user_one, user_two, ip, time) … |
0
40
|
||
|
<?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 = ? "; $stmt = mysqli_stmt_init($conn); if(!mysqli_stmt_prepare($stmt, $sql)){ header ('location: test.php?error'); exit(); }else{ mysqli_stmt_bind_param($stmt, "s", $val); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); } $sum = 0; $one = 1; $sum = $sum + $one; while ($row = mysqli_fetch_assoc($result)){ echo " <form class='test_place' action='answer.inc.php?QUESTONS=".$_GET['QUESTONS']."' method='post'> <h4>". $sum = $sum + $one .". ".$row["JAUTAJUMS"]."</h4> <input type='checkbox' … |
0
32
|
||
|
i want to know how to create qr cde in php |
0
45
|
||
|
[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 are tons of questions here on VB6 on how to connect to a database, how to add, delete, edit, search data within your database tables etc. This tutorial has been created to serve as a learning curve or to add more knowledge to your current code writing skills. This tutorial … |
1
1,169
|
||
|
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 start date column and an end date column. I have a form that you input the start date and end date range you want to search the database for and display the results. My issues is with getting the dates that are inputted on the form to display on the … |
0
49
|
||
|
// 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 |
0
31
|
||
|
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 to alter codes with the first undertaking that utilizes 'root'@'localhost', I was attempting to choose from a table to be stacked to a DataGridView when a blunder sprung up saying "Host 'hostname' isn't permitted to interface with this MySQL worker". The second venture is working fine. This lone occurred after … |
0
12
|
||
|
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 from this code is when I click a stockname from the dropdown list, The stockno and producer textbox should be fetched. But now only the stockno is fetched and the producer is null. Please help out. Thank you. Emeka |
0
26
|
||
|
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 so on.Same thing to when user remove the 1st images,they can't seem to upload again.Below please see the code that i had write so far. Can anyone assists me on this? Thank you. <form method="post" action="partner_rider4"id="form_img"> <div class="mb-2"><h2 class="title-form">Upload file<span></span></h2></div> <div class="form-row text-lg-left text-center"> <div class="col-lg-12"> <div class="d-inline-block mr-lg-3"> <div … |
0
85
|
||
|
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 be: user_one user_two c_id reply 2 1 43 Hello One 1 2 43 Hello Two Instead its like user_one user_two c_id reply 2 1 43 Hello One 2 1 43 Hello Two If i loose the GROUP BY it returns 4 records but i only have two, like this user_one … |
0
21
|
||
|
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. |
-1
46
|
||
|
<?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); } if ($row = mysqli_fetch_assoc($result)){ $password_check = password_verify($password, $row["PAROLE"]); if ($password_check == false){ header ('location:userpanel.php?password=false'); exit(); }else if ($password_check == true){ $SQL = "DELETE FROM user_acounts WHERE e_pasts=?;"; $stmt = mysqli_stmt_init($conn); if (!mysqli_stmt_prepare($stmt, $sql)) { header('location: userpanel.php?error'); exit(); } else { mysqli_stmt_bind_param($stmt, "s", $email); mysqli_stmt_execute($stmt); header('location: userpanel.php?delete=true'); exit(); } } } … |
0
27
|
||
|
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 stored as unsigned integers and are indexed. The lookup table is approx. 3M rows, relating ip ranges to country, area, and city. The download table is approx. 2K rows. What I'm trying to do is get the id from the lookup table row that has the ip range that the … |
0
185
|
||
|
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 |
0
44
|
||
|
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 = 'B'; $sql = "select t_empeval.id, t_empeval.nama from t_empeval Where t_empeval.grade='$c' and sect=CONCAT('$a','$b') order by t_empeval.v1 desc limit ".$var1.",".$var2.""; $query = mysqli_query($koneksi, $sql); if(!$query) { die('SQL Error :' . mysqli_error($koneksi)); } $b=0; while ($array_b = mysqli_fetch_assoc($query)) { if(mysqli_num_rows($query) > 0) { ?> <tr> <td><input type="text" name="id_b[<?php echo $b; ?>]" value="<?php … |
0
29
|
||
|
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 | varchar(20) | YES | | NULL | | | lname | varchar(20) | YES | | NULL | | | phonenumber | varchar(10) | YES | | NULL | | | city | varchar(20) | YES | | NULL | | | state | varchar(20) | YES | | … |
0
8,314
|
||
|
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 have been entered: $tags = array('linux,php,mysql'); Now when the array has just one tag I can search the tags table and return whether the tag already exists in the table or not. But I am unsure how I can go about checking for each array item. My thinking on how … |
0
78
|
||
|
$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 answers but some of them are outdated ("such function doesn't exist in this namespace") and others involve 10+ lines of code-functions that should actually be shorter. What is a clean and finite way to extract entire array out of prepared statement? |
0
1,832
|
||
|
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 users table to retrieve its contents if (isset($_SESSION["user_id"]["0"])) { // select a particular user by user_id $user_id = isset($_POST["user_id"]) ? $_POST["user_id"] : ''; $stmt = $pdo->prepare("SELECT * FROM users WHERE user_id=?",$_SESSION["user_id"]["0"]); $stmt->execute([$user_id]); $user = $stmt->fetch(); # get user data } // query courses table to retrieve its contents $cid = … |
0
75
|
The End.