648 Posted Topics

Member Avatar for Dani

If you feel comfortable about something you don't really like radical changes. I understand the reasons that drove DaniWeb to that choice , some of them are correct in my opinion some others have a giant hole (e.g. why couldn't DaniWeb have a different UI for mobile + tablets with …

Member Avatar for Nick Evan
2
1K
Member Avatar for denvii92

I have never had to choose among those two concepts (maybe because networking wasn't an option in my times). The simple answer when we have a major decision in our life is taking a bit time off. Involve in both decisions , understand what are they and then move on. …

Member Avatar for jkon
0
248
Member Avatar for jkon

The full title: "Why daniweb attracts only newbies with no interest to stay in programming and what can be done to keep the others as well ? " Over few past years now (six my profile says) I love daniweb because it is a polite and civilized place to be …

Member Avatar for Dani
3
1K
Member Avatar for kavinsac

Kavin (or olivia) hadn't responded in any message so you know that we are talking to each other and not answering anything. We all love to teach others , to tell them our own wisdom. I respect the qualities mentioned but we are not responding to kavin any more. One …

Member Avatar for diafol
0
573
Member Avatar for amith_ami

Arrays functions in PHP is a big failure till now (that is sad for a language that depends so much in associative arrays). In fact creating a simple implementation (like a static method in a arrays Util class) over an array function might make it 10 to 1000 times faster …

Member Avatar for diafol
0
243
Member Avatar for SimonIoa

Ok I will try to see if I understood also. When you say calculate do you mean you just want to add three numbers ? When you say that the third number is “third is the count of this” do you just want to count the rows in the users …

Member Avatar for SimonIoa
0
724
Member Avatar for spluskhan

It should show a parsing fatal error , always use: error_reporting(E_ALL); ini_set("display_errors", "1"); at least at development stage Line 18 you have the LIMIT AFTER you closed the double quotes of the sql statement's string. e.g. <?php $database = "test"; $username = "testuser"; $password = "testpassword"; $db = new PDO("mysql:host=localhost;dbname=".$database, …

Member Avatar for diafol
0
214
Member Avatar for Yves11

You could start by this: https://www.daniweb.com/programming/web-development/tutorials/437592/introduction-to-phps-object-orientation

Member Avatar for diafol
0
267
Member Avatar for Sophia_1

As pixelsoul and cereal wrote the "20" in front isn't coming from that part of the code. It comes either from a part above or by html . Follow cereal advice to create a file just printing the result of the date(“d-m-Y”) and then return in your code printing a …

Member Avatar for diafol
0
372
Member Avatar for Harman_2

The way you want it (without counting only special views e.g. from members) is quite easy. Add a “viewed” int counter with default 0 , in your table and each time the app displays the full post update it incrementing it by one e.g. (SET viewed = viewed + 1)

Member Avatar for jkon
0
192
Member Avatar for salam_1
Member Avatar for solomon_13000

Think about to turn to real responsive apps with other UI for mobiles and tablets and other for PC's. What is called today “responsive” is heavily misusing of media queries and ends up to the minimum common factor and because Mobiles have different events most of them (except the real …

Member Avatar for jkon
0
387
Member Avatar for cigoL..:)

I guess that you have googled “AJAX PHP example” … Although most of these tutorials have problems , could give you an idea of what is an AJAX call and how to use the results. What exactly is that you don't understand or have troubles in your code ? Define …

Member Avatar for jkon
0
239
Member Avatar for shashigowda

Mysql_* functions are deprecated. See https://www.daniweb.com/programming/web-development/tutorials/499320/common-issues-with-mysql-and-php . PDO is easier and safer , so not using it doesn't make any sense. You should understand the code that you paste. Line 8 you split (explode) by ' ' not by comma and then you wonder what is the reason that you …

Member Avatar for pritaeas
0
2K
Member Avatar for Testt

We have one other business model and think about that . We have a contract that is saying that all data belongs to the client and all software to our company. What that means is that we are obligated to make it work and if the client decide to go …

Member Avatar for gentlemedia
0
573
Member Avatar for Edmund_1

seperate concernc .. java will be in servers side making all the requests (e.g. in the db) don't have such requests in JSP , JSP is meant to be what the title says "Java Server Pages" (it is translated to a provider back to the server) seperate js js can …

Member Avatar for Edmund_1
0
423
Member Avatar for jkon

Although objects collections have a place in the PHP world many years now , their use is now flourishing because more and more PHP programmers turn to OOP. This tutorial is a sequel of https://www.daniweb.com/programming/web-development/tutorials/500118/a-simple-data-layer-for-oop-php-applications (we will refer to it as “previous tutorial”) and https://www.daniweb.com/programming/web-development/tutorials/500118/a-simple-data-layer-for-oop-php-applications , in order to understand …

Member Avatar for jkon
2
848
Member Avatar for cambraydesign

What is very strange with your question is that this web service method (DownloadDataByUserString) returns an XML inside (that more over has different encoding !!!). I have worked with web services methods that returned XML but in a CDATA wrapper , not that way. If you have something to do …

Member Avatar for cambraydesign
0
2K
Member Avatar for jkon

I can't really understand how some people are thinking , the are inexperienced ok but what do they think ? . This thread has nothing to do with me , just reading a thread from a person that is here seven years in PHP community and still don't understand what …

Member Avatar for rproffitt
5
353
Member Avatar for Vusumuzi

Hello Vusumuzi . If I understood the only thing you like to do is have the PHP code in the content , so here are two alternative easy ways. There is always the option to use a programming languages code highlighter JavaScript browser text editor. <?php // First option highlight_file("test.php"); …

Member Avatar for jkon
0
93
Member Avatar for blueguy777

bluegue777 why don't you give us your whole project to do it for you? The first answer was solved by minitauros , did you thanked him and marked this as solved ? , No you moved on to the next question that you had in mind. Instead of thanking you …

Member Avatar for blueguy777
0
565
Member Avatar for James_43

If I understood your question , the answer is quite simple: $arr = [ [21,43,54,34], [2.5,53.2,24,55], [32,11,2,5] ]; $minArr = []; for( $i=0; $i < count($arr); $i++) { $minArr[$i] = min($arr[$i]); }

Member Avatar for James_43
0
180
Member Avatar for lloyd.farrell.7

Hello lloyd.farrell.7. Three quick questions that probably are the answers. Why do you need to do it in that way? Do you know what sessions are? Why do you use GET for posting ?

Member Avatar for jkon
0
204
Member Avatar for AntonyRayan

The reason is simple , ids are uniques , class names in other hand are not. “So I need a calculation to show balance amount by subtracting payable amount with amount for all textboxes in onblur dynamically.” you wrote , this isn't a question , this is something that you …

Member Avatar for jkon
0
300
Member Avatar for RikTelner

We all make a journey and I believe that our current position to that would be quite different if that journey were alternated. But my advice to everyone else would be to find a job that doesn't feel like one but feels like a hobby. If you enjoy your work …

Member Avatar for diafol
0
431
Member Avatar for jkon

Hello, This tutorial is the next of “[A simple Data Layer for OOP PHP Applications](https://www.daniweb.com/programming/web-development/tutorials/500118/a-simple-data-layer-for-oop-php-applications)” so having read it and made your own tests is needed to understanding what we are doing. So far we have a Db object (child of PDO that standardize and simplifies its use) , a …

Member Avatar for jkon
4
615
Member Avatar for James_43

That was interesting but it took me a lot more time to decide the names of the variables than actually writing (I am not sure for those names till now). I used the PHP math functions to achieve a precision that can be set through the scale variable of the …

Member Avatar for jkon
0
620
Member Avatar for LibraryCode

Hello, See the View_Generator_Table class at https://www.daniweb.com/programming/web-development/threads/498786/creatings-html-row-from-a-database#post2181597 What went wrong in your code is line 21 , you don't have 10 columns

Member Avatar for jkon
0
9K
Member Avatar for blueguy777

@see http://php.net/manual/en/function.file-get-contents.php && @see http://php.net/manual/en/function.json-decode.php

Member Avatar for jkon
0
409
Member Avatar for James_43

Hello James, PHP associative arrays (that are the one returned by PDO fetch PDO::FETCH_ASSOC @see http://php.net/manual/en/pdostatement.fetch.php ) need quotes if the key is string . e.g. $results[2]["blog_id"] . If you don't have quotes PHP will search for the constant with name blog_id , that this is your case here (you …

Member Avatar for James_43
0
499
Member Avatar for jkon

A simple Data Layer for OOP PHP Applications Hello, first of all to understand this tutorial would be best if you have some knowledges about OOP ( https://www.daniweb.com/programming/web-development/tutorials/437592/introduction-to-phps-object-orientation by priteas ) and DB usage (MySQL in this case) with PHP https://www.daniweb.com/programming/web-development/threads/499320/common-issues-with-mysql-and-php by diafol ). What we will try to achieve …

Member Avatar for jkon
4
2K
Member Avatar for shany0786

From the structure I see I guess that you put your php source code under public_html . Is there any reason for that ? Is php “public files” ? Generally speaking php and whatever is meant for source code are going in a src folder above public_html. What could stay …

Member Avatar for shany0786
0
394
Member Avatar for developer707

Hello Klaus , first the code and then some comments <?php error_reporting(E_ALL); ini_set("display_errors", "1"); $database = "test"; $username = "testuser"; $password = "testpassword"; // Nowdays MySQL hase natural prepared statements and // we gain from using them and not the PDO emulation of them $pdoOptions = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_EMULATE_PREPARES …

Member Avatar for diafol
0
948
Member Avatar for James_43

Hello James_43 , we call it friendly URL's . They are friendly also in S.E.O. perspective but also to final user. You must first understand how .htaccess work a bit , not something complicated just as how you can redirect the request to one php file. Then normally (without any …

Member Avatar for diafol
0
267
Member Avatar for UK-1991

/** * I don't know if apartment in your table is * VARCHAR or INT or its type */ $safe_apart = "test value"; $room_no = "test value"; $safe_floor = "test value"; $database = "test"; $username = "testuser"; $password = "testpassword"; $db = new PDO("mysql:host=localhost;dbname=".$database, $username, $password); $statement = $db->prepare("SELECT * …

Member Avatar for jkon
0
186
Member Avatar for James_43

Yes to understand what an object is , is something you have to do ;) The second is to read and understand the error messages , you wouldn't need hours to realize that $statement is not an object. You get the PDOStatement object @see http://php.net/manual/en/class.pdostatement.php that you correctly assign it …

Member Avatar for James_43
0
277
Member Avatar for jkon

Hello, I am writing this to warn you and because I haven't selected yet witch solution to choose , so your opinion is more than welcomed. The problem: in some version of iPhone / iPad software the cookies aren't separated by “;” but by comma and doubled. The first fatal …

Member Avatar for jkon
1
1K
Member Avatar for LibraryCode

take a look at: https://www.daniweb.com/web-development/php/threads/498786/creatings-html-row-from-a-database#post2181600

Member Avatar for diafol
0
7K
Member Avatar for ehpratah

What is this “../includes/pdo_config.php” ? It seems that in first case you include it AFTER you create the first prepared statements . You use two different ways to retrieve the results with no apparent reason. Would be good to have some consistency on that. Of would be better to first …

Member Avatar for ehpratah
0
3K
Member Avatar for jkon

There are some times in my life that I am sure there is a bug in my code but it turns up that the bug was in the language or in the system. This thread is talking about those times. Please share your own relevant experience. I ll start sharing …

Member Avatar for Slavi
0
548
Member Avatar for anmol.raghuvanshi1

Just understand that you ask a question about a specific framework. I have n idea about it , doesn't that framework have a community ?

Member Avatar for cereal
0
2K
Member Avatar for Deimos161

The “json query” you refer to is the doughnutData at line 2 ? Do you want to use it server side (in PHP) or client side (in JavaScript) ?. How do you want to use this array of objects , what do you want to do with it? If you …

Member Avatar for Deimos161
0
203
Member Avatar for phoenix254

Hello phoenix254 the few line of code that you presented have nothing to do with what you are wrote that you are trying to develop , a real time chat system. More over it is' just an AJAX call, client side and just a bare GET in server side. You …

Member Avatar for jkon
0
281
Member Avatar for phoenix254

Because you set it as null ? I will not read this code to find more errors but in you while loop you never set it to any variable , you either break or continue ( $last_id=$current_last_id; is under both cases) @see http://php.net/manual/en/control-structures.continue.php @see http://php.net/manual/en/control-structures.break.php @see http://php.net/manual/en/control-structures.while.php

Member Avatar for phoenix254
0
274
Member Avatar for jeffersonalomia

jeffersonalomia , I hope you know that PHP can execute an external program. That way you can save the original C++ code in a file , and run the C++ compiler with arguments the file. @see http://php.net/manual/en/function.exec.php But ... as Diafol wrote , why in earth , do you want …

Member Avatar for diafol
0
1K
Member Avatar for Nathaniel10

If you are an IT manager you must think how will you make more money out of people. You prefer people that really love what are they doing , are proud for their work , will say no when you ask something really stupid or dangerous and like when their …

Member Avatar for jkon
0
248
Member Avatar for NuGG

Have you checked with a client side tool like Firebug or Chrome Developer tools that the same CSS rules apply in both cases ?

Member Avatar for NuGG
0
539
Member Avatar for jkon

This is about “https://www.daniweb.com/web-development/php/tutorials/499320/common-issues-with-mysql-and-php” i created a new thread because that is a great tutorial and I believe that comments underneath it would troubled the reader. Hello Diafol , I believe that this tutorial should be linked in the “read first” section , but to be honest I don't believe …

Member Avatar for diafol
2
693
Member Avatar for johnywhy

What is the top of the page for you ? How do you define it ? The statement that you asked elsewhere as well has nothing to do with increasing the possibilities of getting an answer , it rather declines those.

Member Avatar for almostbob
0
258
Member Avatar for iharrythomas

I understand not trusting the latest versions of PHP released for production but 5.3 is something old, consider at least 5.5.24. To give you any help we should know a bit more of where are you going to upgrade (what is your system). Also do you have dedicated server or …

Member Avatar for jkon
0
109

The End.