648 Posted Topics
Re: Hello, take 5 minutes (and I am saying a lot) to read what file upload is (e.g. http://php.net/manual/en/features.file-upload.php or http://php.net/manual/en/features.file-upload.php was the first two searching in Google). As you will realize in less than a minute your code doesn't make any sense. [“name”] is the name of the file as … | |
Re: Let's brake down what you are trying to do. You are trying to validate form inputs. There are many many ways with OOP to do this but let choose one that is near to your original approach. Create an abstract class (lets call it FormValidatorAbstract) , having as constructor an … | |
Re: You remind me how we doing it before AJAX. We were loading an iframe that supposed to be js but was originated through Java or PHP and called functions of the main app.js . Now we don't have need for such approach. It seems that what you really want is … | |
Re: What do you mean with “for some reason it doesnt work” , what happens ? . What is the #click DOM element that clicking it returns false , is it inside this <a> ? There are many issues with the code that you provided that are irrelevant with your question … | |
Re: How I would respond in such question? “ Move to OOP , you are describing an object , and you keep its properties in an associative array that could be anything or nothing”. OOP isn't the greatest thing can be , but is the greater we have so far. | |
Re: I guess reading your post that you already have an action selecting “a pet” and change its group. How do you do this , by a radio button and a submit ? If so you just have to select one more field in each pet that is checkbox and a … | |
Re: And I want to earn 3.000$ every day and of course ... world peace . Is there any question ? | |
Re: As I understood you serve images dynamically so you are familiar on how to serve images in other sizes as well. It alls has to do with how you store image data in your database and how you serve them. For example if serving them you resizing images in a … | |
Re: Lets start with one really obvious. 23 - No start tag (<button>). (an editor could help you a lot) | |
Re: What exactly don't you undrestand from this message ? | |
Re: Let me understand , you don't want to HOLD your script while you are waiting to receive the response of GET or you don't know at all how to get the response? In any case what method do you use in order to create those GET requests ? | |
Hello , today I was developing a short url system and I created this class to help me encode / decode integer (id) to small string. That way for example “Ac” means 3674 . Because I believe that it may be helpful to others too I share it here. Notice … ![]() | |
Re: This sounds like a puzzle , what etc mean ? Everything that has to do with client side ? | |
Re: A db results array that you could use to instantiate a real object. The only advanced I see here is a variables mess | |
Re: I believe this one has a simpler approach. What you need is two columns in your table latitude and longitude then just use them to insert a Google map with them as location. Before that get acquaintance with Google Map and make your own JavaScript function to make it easy … | |
Re: You don’t store anywhere your booksList , despite that you just give values to that array in the constructor of your Model. As I understand this is visitor scope caching so you could be fine using session, BUT this is something the controller is responsible for not the model in … | |
Re: Hello Jack_9 , what do you mean that you have created PHP applications that aren't for web ? Do you mean a standalone application using a PHP GUI , or a single background server process , or something completely different? | |
Re: davidjennings maybe diafol will answer that but there are too many things that you are doing wrong in my opinion. This is a tip to check on them. Really what is the reason to use Get after all ? ... To make that URL accessible to everyone ? .. You … | |
Re: I have seen a number of questions of that type and I am thinking of writing a tutorial here about the Indexed List Model in OOP PHP with Assigners and Data Workers (but to be honest I don't see much interest in the OOP approach of this issue) . For … | |
Re: Hello, First of all you must explain what you mean with the term “tabs”. Normally we would mean by that term browser tabs , which means that you have two separate pages opened (that can communicate through JavaScript if the one opened the other) , but maybe you refer to … ![]() | |
![]() | Re: Just a different approach since it is an interesting question $keys = array('key1', 'key2', 'key3'); $value = 'some value'; $md = array(); $md[$keys[count($keys)-1]] = $value; for($i=count($keys)-2; $i>-1; $i--) { $md[$keys[$i]] = $md; unset($md[$keys[$i+1]]); } var_dump($md); |
Re: What exactly trubles you with the message "Cannot modify header information" ? The message is complete you have an outpout in line 229 .... What it should say more ? | |
Re: I always use PHP as an OOP language (it is a cheap language in terms of system recourses and employs salaries) . Sometimes I forget what amateur code lye underneath the sophisticated layers we have to create. A big thanks Bob for remind me this. | |
Re: Take a moment to read what you are asking and then read in wikipedia (or anywhere) what is html and what is excel. So the problem is producing the html table or do you really want to export your data to excel file ? . Recently I learned that learning … | |
Re: The flower of winter … [Click Here](http://www.youtube.com/watch?v=WBtx1IvWbQk) No the singer hasn’t a great voice or the music isn’t too prototype or the lyrics. But that mix of sorrow, anger, sensitivity and hope is very close to what I feel that period. | |
Re: Start by understanding HTML 5 , than JavaScript . then jQuery and then CSS 3 ., of course then you should learn some PHP … | |
Re: To be honest a “hell of a timesaver” would be also if you let your visitors alter the system tables by their selves. But you don’t want that, why ? . I suppose because you want to have rules of what user can edit what table, what row and in … | |
Re: Hello vukhacbiet, You are asking something very generic without going in details on what you are trying to do ( “the same as a basecamp or teambox” you refer to , doesn’t mean a lot to me for example) . It is like you are asking an easy way or … | |
![]() | Re: > I just need to make sure the user can't really change a field with an id they shouldn't have access to. The sort answer: you have the user id that has being logged in your session , and as I understood you have some rules of what fields whose … ![]() |
Some weeks ago I posted this and I realized from the referrals that it may help to be as a code snippet. This is an example of getting products details from categories – subcategories using ajax call. I am fond of OOP and this is not , but I believe … | |
Re: If A and B will use the same source code and database what will be the difference the view? | |
Re: To be honest I can’t get It. I am tending to believe that there should be a hidden (till now) field … lets call it for now the timestamp of a priority. To give you a full answer if this is the case I would need the schema (the PHP … | |
Re: A general principle is not jumping to coclusions without reading and trying. You wrote : *“so if $foo contains objects and not simply strings, if I call a method in that object which sets some property, as soon as the foreach moves to the next object in the array that … | |
Re: Hello Douglas and a happy new year, *if I create an associative array and place several key>value pairs in the array, will they remain in the order that they are placed, or will they be re-ordered in any way?* They will remain in the order that you inserted them to … | |
Re: I am not sure that I got the way that you collect those IP’s . You said “email registration/email confirmation” probably that means that “confirm” an email registration by sending a special link to each one. If this is the case and you get the IPs through the confirmation tier … | |
Re: Of course before asking you have experimented with some technologies. What have you read and tried? … java applets ? web sockets ? .. | |
Re: Hello, First of all let talk a bit about what is the meaning of using CURLOPT_PROXY (http://www.php.net/curl_setopt ) . The meaning is that you are going to use one other proxy server to fulfil the request and finally give results to your visitor. As I understood this has nothing to … | |
Re: The first and most serious issue is that you are not using prepared statements. The second one is that you are using a reserved word as a field named “real” . Take a look at http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html | |
Hello, first of all let me clarify that I am just a programmer but I needed a dedicated server , with no many modification so I bought an unmanaged dedicated server from a hosting company (I try to avoid using their support as they stated a lot that this is … | |
Re: When I first signed in at daniweb I worked for more than 12 hours a day (including Saturdays and Sundays) in a company taking Cobol programs and turning them to Java. So it were j … everything … jMornings jEvenings jNights and more over my name is Kon so it … | |
Re: Over the past I have used two main ways (with some variations) that really worked with application that needs to know who is online. The first is quite simple … an online visitors table with a code (could be a hash with internal salt of a session id if the … | |
![]() | Re: I really can’t see how this code is working properly, In line 7 you open an if that is never closed. Using an IDE like Eclipse or Netbeans would reveal you that in the first place. I believe that IDE’s are not only for programmers but for beginners as well. ![]() |
Re: If you use namespaces you want have to require or to have a autoloader class ? ust use logic .. you provided those data in a file … in somehow that file should be read.. | |
Re: In my point of view there couldn’t be such thing as “the best” framework. There are many factors of choosing a framework but I strongly believe that three of them are the most significant 1) What is your programming background 2) Why do you need a framework and therefore what … | |
Re: Don’t look at it , it is a very bad coding example , the title of it could be “things you should never do”. In OOP PHP you never have to deal with function (few exceptions as fatal error calling functions)… The laughing part is func_get_args() , if you don’t … | |
Re: You want to use https .. do you have ssl certificate ? If you haven’t don’t use https … In your basic code you use $_SERVER['REQUEST_URI'] So check that primitive variable that is the page that you want to apply the rule for and if it is apply it .. ![]() | |
Hello, I suspect that this is an elementary question but maybe I don’t understand how to search for it. I am a programmer, but having a small company and we can’t afford yet a system administrator, so I play this role as well with my limited practice on it. Currently … | |
Re: Hello. The main reason isn’t working is that in line 25 you make a check with a variable ($data) that is not declared. Although you use PDO you don’t use prepared statements that is really a bad idea, with those in mind lines 23 through 30 could be (You have … | |
Re: Urban you could benefit from PDO and a medium (framework or not) delivering the post data. You might thing that the code there after all those lines is secure but is really wide open… You could achieve more security with fewer lines of code … think about it … |
The End.