39,316 Topics

Member Avatar for
Member Avatar for Mohammed_44

//The php section of the code <?php function getJSONFromDB($sql){ $conn = mysqli_connect("localhost", "root", "","rent"); //echo $sql; $result = mysqli_query($conn, $sql)or die(mysqli_error()); $arr=array(); while($row = mysqli_fetch_assoc($result)) { $arr[]=$row; } return json_encode($arr); } $jsonData= getJSONFromDB("select Pic from Display"); $jsn=json_decode($jsonData); //for loop to retrieve rows from database for($i=0;$i<sizeof($jsn);$i++){ $a=$jsn[$i]->Pic; //here is the main …

Member Avatar for network18
0
372
Member Avatar for sheik_2

Hi, Below is my code can you please help me to fix it. function gw_bbcode_html($t) { $regexfind[] = '/\&lt;(.+)\&gt;/esiU'; $t = str_replace('&amp;', '&', $t); $t = str_replace('&quot;', '"', $t); $t = str_replace('&039;', ''', $t); $regexreplace[] = "gw_bbcode_html_tag(gw_bbcode_htmlspecialchars('\\1'))"; $t = preg_replace_callback($regexfind, $regexreplace, $t); # $t = str_replace('&#', '&amp;#', $t); $t = …

Member Avatar for rproffitt
0
824
Member Avatar for subhra44

Can anyone tell me how to retrieve records from database one at a time.. I am attaching a sample code here: [CODE]include('connection.php'); $sql1="SELECT * FROM question_master"; $result=mysql_query($sql1); while($row = mysql_fetch_array($result)) { echo $row['Question']; }[/CODE] Let me explain the code.. There is a table named "question_master" (containing some questions) in database …

Member Avatar for akshay_12
0
5K
Member Avatar for Magic8Computing

How do i format my Query result so it has thousand seperator and only to 2 decimal places <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Daily Sales</title> <link rel="stylesheet" href="../styles/login.css" media="all" /> </head> <body class="normal"> <?php include("../includes/x3connect.php"); ?> <?php $sql="SELECT SUM …

Member Avatar for rproffitt
0
468
Member Avatar for Magic8Computing

Hi I have the following code that i can run in MSSQL Query and the result are returned correctly but when i try to run it in PHP it errors what do I need to change to get it to work please. SELECT SUM (CASE WHEN FFP.BPARTNER.CUR_0='GBP' THEN (FFP.SORDERQ.YORIQTY_0 * …

Member Avatar for Magic8Computing
0
408
Member Avatar for idaryl

I am trying to get a small plugin Im putting together to work from the admin page - I have the functrion working, although it would be better to "activate" it from that page *the default would be "OFF" here is a copy of the function - it just turns …

0
171
Member Avatar for mattyd

I have recently been using XAMPP for dev. Although I'm new to XAMPP, the recent issue sprung up surprisingly, the simple script running a day before. The script is just being used to test the ability to capture/display an IP address; this will later be used in a larger project: …

Member Avatar for mattyd
0
586
Member Avatar for Online Check

I have a website name onlinecheckwriter.com which helps my client to print check online. Right now I'm facing one problem that I didnt find any vendor that provide offical routing never verification api. Right now our customer add routing number but I need cross check it with bank . So …

Member Avatar for rproffitt
0
665
Member Avatar for davy_yg

How to take part of url and store it into a variable? For example: /home/pages/id --> I want to take id out and store it into $id. How to do that?

Member Avatar for diafol
0
374
Member Avatar for spades0001

Greetings! I am trying to connect my android application to a MySQL database. The app serves as a tool for lawyers providing them features such as: - a calendar wherein they can add and view events -an agenda list wherein they can see a list of their agendas -a notification …

Member Avatar for HitsuGaya198
0
4K
Member Avatar for davy_yg

Hello, This time I am having problem with html tag. pages.blade.php <section id="container"> <menu></menu> <cont> <center><b>{{ $pages2->pages_title }}</b></center><br> {!! $pages2->pages_content !!} </cont> <sidenav> @foreach( $pages as $p) <a href="{{url('')}}/home/pages/{{ $p->id }}">{{ $p->pages_name }}</a><br><br> @endforeach </sidenav> </section> If I let the html appears: {{ $pages2->pages_content }} This is the title and …

0
215
Member Avatar for borgyborg

newbie here! I am working with a simple PHP form with few fields and few uploads. I want to use the Modal pop up form for this. Below codes are working fine. I was able to insert the fields into MYSQL successfully but I don't know how to add file …

Member Avatar for diafol
0
3K
Member Avatar for Patiodude

I run a website where I periodically post articles. I'd like to add a timestamp/datestamp to each article showing the post date (the upload date, I assume, would be the logical choice). I had already asked for advice on this topic; unfortunately, the result is a blank. Literally. Here's an …

Member Avatar for Ty omotayoo
0
724
Member Avatar for සශික

I'm developing some kind of web application simillar to forum. I want to show comments under which it belongs to. I currently used bootstrap, php, mysql for this. Here I post my code.... <div class="col-md-7"> <div class="col-md-12"> <form action="insert_post.php" method="post"> <div class="input-group"> <p><b>You Are Posting As : </b></p><h4><span class="label label-default"><?php …

Member Avatar for diafol
0
508
Member Avatar for sanus

Hi everybody, How to add option target=>_blank in my code. <?= Html::submitButton($model->isNewRecord ? ' <i class="fa fa-save"></i> Save & Print' : ' <i class="fa fa-save"></i> Save & Print', ['target'=>'_blank'] , ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

Member Avatar for sanus
0
236
Member Avatar for jeffersonalomia

Hi, I would like to ask for help with regards on my problem on my phpmyadmin - mysql database. I am using wamp server 2.5. So here's the scenario, I try to insert data on two tables (accounts, user_info) on mysql @ phpmyadmin using php ajax. Now the problem is …

Member Avatar for diafol
0
260
Member Avatar for eoop.org

Hello, I have been strugling with this for a while. Is it possible to create a loop that will make this function run automaticly. I want to type in how many times it should repeat the pattern. For example, i want to run to $sum20 Please help me out! <?php …

Member Avatar for diafol
0
395
Member Avatar for sheik_2

Greetings I am looking for users idea approval and management system where user can register his self online and submit an idea/thought and it only reflects to his/her reporting manager to approve. if the manager approves then it will go to management. please help to create this in php & …

Member Avatar for Reverend Jim
0
175
Member Avatar for diafol

Hi all. Been fiddling with an idea about combining setters and getters in PHP. I really don't like magic methods (`__get` and `__set`) as they're not very flexible (IMO), but equally bore myself to distraction with set/get methods. Anyhow, having used jQuery for some time, I really liked the non-verbose …

Member Avatar for diafol
1
406
Member Avatar for Mehidy_1

Hi I'm trying to update my DB table with below code.When I select all row or only 1st row its working fine, but when I select 2nd row or another row, its updating the 1st row value to my DB table. Please see & try to help me. update.php <table …

Member Avatar for hericles
0
415
Member Avatar for davy_yg

Hello, I have two files with slightly different codes from two different programmer. Me and the other guy. And I would like to move part of the working feature from one file to the other codes. Any software that could compare php / laravel codes and highlight the difference? Something …

Member Avatar for Reverend Jim
0
671
Member Avatar for bhuvi_2

hi i want to know how to delete duplicate rows in imported csv files in phpmyadmin in php..below is my code to import csv file in php,i want to delete duplicated rows in my imported csv files which is in database of xampp(phpmyadmin)can anyone add thecode for it <?php $user …

Member Avatar for cereal
0
338
Member Avatar for rpv_sen

Hi i am having 3rd party csv file. i am having php uploading script to upload the datas into my table. while uploading datas into my mysql Table mean while it has to remove duplicate entries rows from CSV file. Please help me

Member Avatar for bhuvi_2
0
9K
Member Avatar for muralibobby2015

I have developed Laravel application which allows dynamic subdomains. I mean single code for all tenants.each tenant will have separate database. But how can I setup crons for each subdomain?

Member Avatar for cereal
0
437
Member Avatar for new_2

function total_price (){ $total = 0; global $db; $ip = getIp(); $sel_price = "select * from cart where ip_add='$ip'"; $run_price = mysqli_query($db,$sel_price); while ($p_price= mysqli_fetch_array($run_price)){ $product_id = $p_price['p_id']; $product_price = "select * from product where product_id='$product_id'"; $run_pro_price = mysqli_query($db,$product_price); while ($pp_price= mysqli_fetch_array($run_pr0-_price)){ $product_price = array($pp_price ['product_price']); $values = array_sum($product_price); $total …

Member Avatar for benanamen
0
188
Member Avatar for Anil_15

Select quray is working but delete query not working. <table border="1", align="center", width="98%", margin="auto", cellpadding="auto"> <caption><h2>View News</h2></caption> <tr> <th><input type="Submit" name="" value="Delete"></th> <th> S.No. </th> <th> Title</th> <th> Description</th> <th> Delete</th> <th> Edit</th> </tr> <?php $sel="select * from add_news"; $exe=mysql_query($sel); while ($fetch=mysql_fetch_array($exe)) { ?> <tr> <td><input type="checkbox" name=""></td> <td> <?php …

Member Avatar for benanamen
0
306
Member Avatar for Mereinid

Hello all, I am having a bit of an issue with a problem in my Web Dev Class. I am unable to get my "localhost" to pull up, it keeps giving me an error of; Parse error: syntax error, unexpected '<', expecting end of file in C:\xampp\htdocs\xampp\Chap19\Fig19_9.php on line 19. …

Member Avatar for diafol
0
527
Member Avatar for dwlamb

Is it possible to attach a jquery autocomplete input to a form initiated by ajax editing a table? I have the following method for making a table cell editable using AJAX. I.e., user clicks on the cell and it transforms to a mini form. Hit Enter and the changes are …

Member Avatar for RobinR
0
489
Member Avatar for santhoshsocial
Member Avatar for Jiecel Marianne

The End.