39,326 Topics
| |
My script merges 18 files and returns all numbers that occur >=13 times within the merger. I timed my script and array_count_values is so slow it accounts for 80% of the 2.35 sec time. The files are large, 200,000 numbers per file, so the merged array is well over 2 … | |
Hello, I have a problem to get unique values from dateperiod-loop. There is a tons of examples how to do it, but after hours of searching, i couldn't find suitable solution for me. The code starts like this. To put it into array_unigue is hard to accomplish for me. Have … | |
I have a list.php which displays all the records that is in the database with 2 options Edit or Delete. When clicked its suppose to delete by id but instead it deleted everything. I'm not sure where i went wrong, please help. list.php <?php include "db.php"; try { $conn = … | |
This problem's driving me crazy since yesterday. I have a table consist of 5 columns: kode_barang (item ID), nama_barang (name of item), qty (quantity), harga_beli (price), jumlah (total). User can input 2 items. This is the code of the form: <HTML> <?php include "koneksi.php"; ?> <form action="insert3.php" method="POST"> <table id="theTable" … | |
Before I get into the specific issues, I want to provide some other details: - Normally, I work on a live, paid server (even in dev); I realize that is not advised, but it is a bad habit I developed over the years. I've tried using Xammp, but do not … | |
When click the map icon for loading the map, map show the error, Please solve the error | |
How do i formatt the dates do the come out as DD/MM/YYYY please <?php $convar = mysqli_connect("localhost","root","","ffp_calendar"); if(mysqli_connect_errno()) { echo "Error occured while connecting with the database ".mysqli_connect_errno(); } $sqlvar = "SELECT * FROM `calendar` WHERE `CurrentDate` = curdate()"; $resultvar = mysqli_query($convar, $sqlvar) or die("Bad Query: $sql"); while($rowvar = mysqli_fetch_assoc($resultvar)) … | |
is there anyway to stop sql injection while using mysql_connect and not using PDO or mysqli ?? | |
Hello ! I have a task from my university that bothers me and I definately need some help. I have to create a web app in which i can add locations from the world map by taking the coordinates and make route between two selected locations from the added. Also … | |
Hi. Im new to codeigniter, so im not sure if its something wrong with the codeigniter or my php. what im trying to do is if the records from a database table is empty echo a message. The message which ,"No records exist!", does display but then underneath is is … | |
Dear All, I Made a facebook quize website, i wrote code but i have a problem, I want get my name and one of my friend name. but it didn't work. <?php session_start(); // added in v4.0.0 require_once 'autoload.php'; use Facebook\FacebookSession; use Facebook\FacebookRedirectLoginHelper; use Facebook\FacebookRequest; use Facebook\FacebookResponse; use Facebook\FacebookSDKException; use … | |
When a user enters the page in question, a textarea is populated from data from a text file stored on the server. The user can then edit that text (add, erase all or part, and modifiy). When the submit button is clicked, the edited text is written back into the … | |
I created quiz application using PHP..in that Application i display one question per page when user click on next button it display next question from database randomly..so for that i want to display time...but my problem is.. i want to display timer from starting only seconds..and user click on next … | |
//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 … | |
Hi, Below is my code can you please help me to fix it. function gw_bbcode_html($t) { $regexfind[] = '/\<(.+)\>/esiU'; $t = str_replace('&', '&', $t); $t = str_replace('"', '"', $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('&#', '&#', $t); $t = … | |
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 … | |
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 … | |
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 * … | |
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 … | |
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: … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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']) ?> | |
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 … | |
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 … |
The End.