i need to pop a bootstrap modal but from inside will need to make queries from a PHP variable that will vary depending on where the pop originated from. so i have this in my file : <a href="#" class="btn btn-md btn-success" data-toggle="modal" data-target="#editUser" id="User" data-id="UserID123"> update </a> How can I put the value UserID123 in a php variable once in the modal so I can use it for queries ... I've been looking around but haven't seen the solution ... some suggest AJAX but i could figure out to adapt it here thanks

Member Avatar
Member Avatar
+0 forum 8

Hey guys, So I can't seem to figure out why my live server is throwing this error. This works perfectly on my local server. Can anyone help me figure out how to fix this, or lead me in the right direction as to fixing this so my login and registration scripts work? This is the error that shows: "**Notice: Undefined variable: mysqli in /home/public_html/login.php on line 44 Fatal error: Uncaught Error: Call to a member function prepare() on null in /home/public_html/login.php:44 Stack trace: #0 {main} thrown in /home/public_html/login.php on line 44**" My code is below. Login.php <?php // Initialize the …

Member Avatar
+0 forum 0

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
+0 forum 0

I'm looking now for a payment gateway and I have read a lot of information about that. And this article I like the most, https://www.techavy.com/top-ecommerce-payment-gateways/. What do you think about it? And which payment gateway do you prefer more and why?

Member Avatar
Member Avatar
+0 forum 1

validation is working fine for me but i cant submit please help me thanks here is my php

Member Avatar
+0 forum 0

I need to redirect users to two (2) different pages based on the roles given to them in the database. Only the email and password is submitted on the login page. I have to fetch the role from the database which looks like this: Email | Password | UserType aa@me.com xxxxxx System User bb@me.com xxxxxx Administrator And here is what I have done so far: <?php session_start(); error_reporting(0); include('includes/dbconnection.php'); if(isset($_POST['login'])) { $email=$_POST['email']; $password=md5($_POST['password']); $query=mysqli_query($con,"select ID from gts_users where Email='$email' && Password='$password' "); $ret=mysqli_fetch_array($query); $count=mysqli_num_rows($query); if($ret==1){ $_SESSION['detsuid']=array( 'Email'=>$ret['email'], 'Password'=>$ret['password'], 'UserType'=>$ret['role'] ); $role=$_SESSION['detsuid']['ID']; switch($role){ case 'System User': header('location: dashboard.php'); break; case 'Administrator': …

Member Avatar
Member Avatar
+0 forum 19

<center><div id="piechart"></div></center> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['A', 'B'], <?php $query = "SELECT COUNT (*) AS a FROM TABLE WHERE A = '1'"; $results = sqlsrv_query($conn, $query); $row = sqlsrv_fetch_array($results); $A = $row['a']; ?> <?php $query = "SELECT COUNT (*) AS b FROM TABLE WHERE B = '1'"; $results = sqlsrv_query($conn, $query); $row = sqlsrv_fetch_array($results); $b = $row['b']; ?> ]); var options = {'title':'Survei Harian ', 'width':850, 'height':550}; var chart = new google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); } </script> help I wear script on why not play please grafik assistance

Member Avatar
+0 forum 0

I have a problem with laravel and vuejs the code below is in my resources in test.blade.php, I don't see anything in the internet browsers <!doctype html> <html lang="en"> <!doctype html> <head>` <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Laravel</title> <!-- Fonts --> <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet"> <!-- Style --> </head> <body> <div id="app"> <test></test> </div> <script src="http://192.168.3.129/js/app.js"></script> </body> </html>

Member Avatar
+0 forum 0

is there any one works with facebook PHP SDK to boosting post?we are testing the marketing api to implement on our site for do post and boost that. so we created the sandbox account and tested the file and got campaign, ad set,creative and ad id successfully. but cant able to view that test page with test post. Anybody can help me, how to view the post created using marketing api on sandbox?

Member Avatar
Member Avatar
+0 forum 1

Hi, I am trying to insert a data from the database to select drop down list in a table where this comes in the 4th column. But it does not work. There is already data from the database to other columns and it is working , but this is not working for the 4th column in the drop down list. How do you add in a table 4 th column - This is not working - echo "<td> <select> <?php $sql = "SELECT name FROM categories"; $result=mysql_query($sql); while ($row = mysql_fetch_array($result)); <option>". $row[name] ." </option> } ?> </select></td>"; echo "<td><a …

Member Avatar
+0 forum 0

With this php code, I send a request for payment with Paypal sandbox account. However when I go to the submit page I cant see what amount I am paying: https://i.imgur.com/iTra1SQ.png -> here in the red shoulld be displayed - 10.00(amountPayable). How can I send it so it's showed? use PayPal\Api\Amount; use PayPal\Api\Payer; use PayPal\Api\Payment; use PayPal\Api\RedirectUrls; use PayPal\Api\Transaction; require 'bootstrap.php'; $payer = new Payer(); $payer->setPaymentMethod('paypal'); // Set some example data for the payment. $currency = 'GBP'; $amountPayable = 10; $invoiceNumber = uniqid(); $amount = new Amount(); $amount->setCurrency($currency) ->setTotal($amountPayable); $transaction = new Transaction(); $transaction->setAmount($amount) ->setDescription('10 GBP payment') ->setInvoiceNumber($invoiceNumber); $redirectUrls = …

Member Avatar
Member Avatar
+0 forum 1

Dear all, Am new programmers and I'm facing a problem on how I can draw a pie chart column-wise using PHP MySQL. Please see the MySQL table below; id Q1 Q2 Q3 1 Female No 30 2 Male Yes 40 3 Female Yes 50 4 Male Yes 60 What I need is PHP/high chart code that will dynamically plot a pie chart for columns q1,q2, and q3. The idea here is to have the output as per google form does.

Member Avatar
Member Avatar
+0 forum 1

Hi, I need advice on how to implement a Review Management System. Something like realized on mypresences.com or brightlocal.com Not all services allow you to interact with their API. Review services are productreviews, trustpilot, tripadvisor, whirlpool, wordifmouth, seek, indeed, glassdoor. Maybe you now a script or have an offer how it can be realize. Help me, please.

Member Avatar
+1 forum 0

**hello When I push submit the page refresh. Any suggestions to stop refresh ? I'm assuming it's something to do with the submit button but I can't figure it out this is my script :** <form id="form1" class="form-horizontal" method="POST" action=""> <input type="hidden" name="action" value="ajouter_reservation" /> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">Ajouter une reservation</h4> </div> <div class="modal-body"> <div class="form-group"> <label for="start" class="col-sm-2 control-label"> date debut </label> <div class="col-sm-10"> <input type="text" name="start" class="form-control" id="start" readonly> </div> </div> <div class="form-group"> <label for="end" class="col-sm-2 control-label">date fin </label> <div class="col-sm-10"> <input type="text" name="end" class="form-control" id="end" readonly> </div> </div> > <div …

Member Avatar
Member Avatar
+0 forum 2

Hi, I have a form which consists a dynamic dependent dropdown and I want to maintain the entered data into the fields after the form is saved or edited. For an example: <input type="text" name="serial" value="<?php echo $serial;?>"> Similary i need to get the value in my dropdown as well. Hope there is a solution for this. Below is my code. ## ajax.js ## $(document).ready(function() { $("#brand").change(function() { var Brand_ID = $(this).val(); if(Brand_ID != "") { $.ajax({ url:"SR.php", data:{b_id:Brand_ID}, type:'POST', success:function(response) { var resp = $.trim(response); $("#model").html(resp); } }); } else { $("#model").html("<option value=''>----Select Model----</option>"); } }); }); ## Dropdown …

Member Avatar
Member Avatar
+0 forum 2

I am working PHP project on localhost using wamp, for debug process we using error_log() function, every time error_log() stored details of the error in wamp/logs, how can I view my error in the same project folder like wamp/www/goodgoal/ eg: wamp/www/goodgoal/logs/error_log.log Note : Pls recommend PHP Quick Debug Tricks

Member Avatar
Member Avatar
+0 forum 1

What is JDBC? What are different types of JDBC drivers?

Member Avatar
Member Avatar
+0 forum 2

Can anyone help me with my search engine. I need filter search in the system using PHP. The problem with the code: All the provided fields must be filled up..unless it will not work There were 6 fields such as Remark Status: Industry: Position: Location: Age Range: Min and Max I have to use these fields as the filters,but eventually all the fields must be filled up before it works..How if i provide just one field, let say i fill the position as HR Manager so i did not specify its age and location...Please Help me on this,,, if(isset($_GET['advance_searching'])){ if …

Member Avatar
Member Avatar
+0 forum 14

Hit upon [this thing](https://hcaptcha.com/) recently. Seems like a good alternative to Google's reCaptcha. Website users solve the captcha, website owners get paid and AI companies get their data labeled. What do you think guys?

Member Avatar
Member Avatar
+0 forum 3

I am working on a project for drag and drop items in a shopping cart. For an item dropped into the cart, I am trying to implement jQuery $.ajax. The result back from the PHP is pre-pended with '`' and I can not figure out why. This is the javascript: $('#target').droppable({ drop: function(event,ui) { var id = $(ui.draggable).data('id'); var aisle = $(ui.draggable).data('aisle'); $.ajax({ url : base_url+'/index.php/groceries/jquery_append_to_list', cache : false, type : 'post', data : { 'id' : id, 'aisle' : aisle }, success : function(data) { $('#target').append('<p data-id="'+id+'" data-aisle="'+aisle+'" class="draggable">'+data.item+'</p>'); } }) } }); This is the PHP script: function …

Member Avatar
+0 forum 0

I am under developing PHP add to cart without DB, so that i am using SESSION, actually get data from fetch_data.php data to my_cart.php using the POST method, successfully retun the values, After receiving the post data how can i convert to display like a table. workout: fetch_data.php return values. https://snag.gy/IASCMZ.jpg & values received https://snag.gy/ojWxHe.jpg Here is my my_cart.php : // FYI -> Here i am using only two fields : voice_sku & voice_name <table width="100%" cellpadding="6" cellspacing="0"> <thead> <tr> <th>Voice Sku</th> <th>Voice Name</th> <th>Remove</th> </tr> </thead> <tbody> <?php session_start(); $voice_sku = ''; $voice_name = ''; if(isset($_POST['voice_sku'])&& isset($_POST['voice_name'])) { // …

Member Avatar
+0 forum 0

I have multiple HTML tables which is generated by PHP, Each table has a dynamic ID assigned to it What i would like is a total of the time in the "Worked Time" column for each table. [![enter image description here][1]][1] <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Visitor Sign In Admin</title> <!-- Bootstrap Core CSS --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- Custom CSS --> <!--link href="css/sb-admin.css" rel="stylesheet"> <!-- Morris Charts CSS --> <link href="css/plugins/morris.css" rel="stylesheet"> <!-- Custom Fonts --> <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="css/ionicons.min.css"> <!-- needs to …

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I have the following code that I just cannot get to work! Can you please let me know where I have gone wrong? <?php //db_connect.php $con=mysqli_connect("localhost","root","password","database"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } function get_file_extension($file_name) { return end(explode('.',$file_name)); } function errors($error){ if (!empty($error)) { $i = 0; while ($i < count($error)){ $showError.= '<div class="msg-error">'.$error[$i].'</div>'; $i ++;} return $showError; }// close if empty errors } // close function if (isset($_POST['upfile'])){ // check feilds are not empty if(get_file_extension($_FILES["uploaded"]["name"])!= 'csv') { $error[] = 'Only CSV files accepted!'; } if (!$error){ $tot = 0; $handle = …

Member Avatar
Member Avatar
+0 forum 6

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/botomul/public_html/whatsnew.php on line 130 [CODE]<?php error_reporting (E_ALL ^ E_NOTICE); ?> <?php $item=$_GET['id']; include ("header.php"); $mark = mysql_query("select * from product order by product_id DESC"); $counter=0; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Welcome to the biggest marketplace-BOTOMUL.COM</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> <link rel="stylesheet" type="text/css" href="style.css" /> <!--[if IE 6]> <link rel="stylesheet" type="text/css" href="iecss.css" /> <![endif]--> <script type="text/javascript" src="js/boxOver.js"></script> </head> <body> <div id="main_container"> <div id="header"> <div class="top_right"> <div class="big_banner"> <a href="#"></a> </div> </div> <div id="logo"> <a href="index.html"><img src="images/logo.png" alt="" border="0" /></a> </div> </div> …

Member Avatar
Member Avatar
+0 forum 7

I have One Problem in my coding ..I want to upload multiple images in the database in one row with using comma ... for($i=0;$i<count($_FILES['eventpic']['name']);$i++) $pic = $_FILES['eventpic']['name'][$i]; $tmp =$_FILES['eventpic']['tmp_name'][$i]; $location="pics/".$pic; move_uploaded_file($tmp,$location); $q="insert into tbl1(title,tdate,eventpic)values('','','$pic')"; echo $q; through this code i can upload tthe multiple images but not in a single row ....

Member Avatar
+0 forum 0

Hello I am using Crystal report version 11.5.8.826, php version 7.0.10, Apache version 42.4.33 and MySql Version 5.7.14. I have created the sampel rptone.rpt file that contents sample report. I want to load that rptone.rpt file using php. With Crystal report 11.5.8.826, php 7.0.10, apache 42.4.33 and MySql 5.7.14 i have tried to connect/load crystal report file that is .rpt file using COM Object but it gives error $my_report = "report/rptone.rpt"; $COM_Object = "CrystalReports115.ObjectFactory.1"; $objCom = new COM($COM_Object, "localhost", 0, ""); $crapp = $objCom->CreateObject("CrystalDesignRunTime.Application"); $creport = $crapp->OpenReport($my_report, 1); This expected to be open rptone.rpt file that must show the report …

Member Avatar
+0 forum 0

i have a problem in displaying the values of a cookie dynamically code goes as... <?php $x=array(); include("connect.php");//database connection file $temp=$_GET['id']; setcookie(count($x)+1,$temp); echo $_COOKIE['$x[1]']; ?> // how do i display the value of cookie every time... it is over written.... i have tried it with using array.. in short i want to display multiple values of single cookie.. value must no overwrite... coz i don't know how many times the user clicks the likn...

Member Avatar
Member Avatar
+0 forum 6

Hi Pls tell me how to create a Crystal Report in php, mysql using com component Thanks in advance Arry :rolleyes:

Member Avatar
Member Avatar
-1 forum 8

Hello Experts! I am stuck here while generating QR Code using php sql. Basically I am generating code for students using their ids and other information while fetching data from database. But the problem is that when i click on submit button so that table data store in QR Code, then it only generate the QR Code of of only last one student. For Example if i have 6 students, it only generate the qr code of student whose id is 6. Code is here:

Member Avatar
Member Avatar
+0 forum 2

Currently i can search in a box for a specific thing in my database but i can't search in my drop down menus which i need so it can help "find" it as well so it can narrow down the search. my current code: [CODE] <?php $mysql_link = mysql_connect('localhost', 'root', ''); if (!$mysql_link) { die('Not connected : ' . mysql_error()); } // select DB DVD $db_selected = mysql_select_db('DVD', $mysql_link); if (!$db_selected) { die ('Can't use DVD database : ' . mysql_error()); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>DVD Search :)</title> </head> …

Member Avatar
Member Avatar
+0 forum 3

The End.