648 Posted Topics
Re: Of course there is a way … few things that you learn before trying it … PHP … OOP PHP .. JavaScript … jQuery (because JavaScript don’t operates in all browsers the same way) and finally HTML and CSS .. Just learn those and then try … and if is … | |
Re: This certainly isn’t a homework for absolute newbie’s (I guess that the answer that the one asked will give will prove that has none or basic knowledge of programming) . (but to be honest I am not here to help students with their homework but to help programmers) . One … ![]() | |
Re: what is ./header.php or ./footer.php? Is it possible that you do something to the session there ? | |
Re: I don’t think the question has to do with Autoloading vs Combining classes into a single file. The latter (combining classes into a single file) hurts the clearness of OOP architecture in my opinion. The question here in my point of view is very interesting and common. If you have … | |
Re: Save all you php in UTF-8 (Eclipse , Netbeans or other editors will help you with that) . Connect to your db through PDO , PHP has ONLY (and ONLY) that great tool (could be greater but that is what we have) all others are just waist of time and … | |
Re: This thread is solved but there are more on it. How wildcard subdomains solve the problem that you describe to let bob.mywebsite.com become bob.com ?. For me that is the interesting point and I am going to face it in a month or two. What I have figured till now … | |
Re: Anestis you provided a site to copy that who ever developed it should rethink remaking it from the scratch (for example just see the overuse of ‘dns-prefetch’). So your question is what is position fixed in css ? … and how this have to do with PHP ? | |
Re: Beside the messy code (PHP with core logic than view HTML than again PHP with logic than PHP with view with logic,, HTML and vice versa) I will stand on what you are saying that you are trying to do. Multiple upload . Well there are many implementations to the … | |
Re: If the question is “why we use mysql_query in PHP?” the correct answer for me is “A: because you are lazy in learning and you use a deprecated function instead of (for example PDO) ” or “B: because you have a code that you didn’t wrote and have none or … | |
![]() | Re: Hello $_SERVER['HTTP_USER_AGENT'] don’t bring just “Firefox” but something like “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3” depending on the system – browser user use. Instead of making your own parsing method PHP has the get_browser function witch returns an array of informations (if available) of visitors browser. … ![]() |
Re: best4earn if there were a simple solution of what you should do not to be hacked then no one (or few) would be hacked. Understanding how web works and how hackers does will help you avoid the inexperienced hacking attempts (that are the most). There are some things that are … | |
Re: Isn’t the action URL ( you don't have actual actions in this ...) extra.php ? Isn’t this plain old PHP page named form.htm ? So you send a request a to the extra.php and you try to get it through form.htm ? | |
Re: Best4earn you want the best framework with many videos , so you don’t really want framework. Just a video clip , sure Yii has spend a lot money in marketing , laravel is one more that spends some but with more targeted group , the point is witch framework advertise … | |
Re: To be honest I had many concerns about jQuery , and I still have. But I use it. So sure http://jquerymobile.com/demos/1.2.1/ is a clean logic for the UI . But the UI is just the end point , the model , the data structure and how controller does it is … | |
Re: Almost each editor has pros and cons , so there is no reason to start a pointless discussion of what is the best – the best has to do with who you are as programmer and who you want to be. But the question is what our favorite is, so … ![]() | |
Re: As iamthwee stated coding style is a personal choice. But this is actually above coding style, it is in the core of programming logic if you choose this alternative syntax for control structure. Most languages are architectural neutral, I tend to believe (with no so much joke on it) that … | |
Re: You forgot to mention the problem . I can see many problems in this code , but what is the one that is troubling you ? | |
Re: Why so CI aren't you intelligent enough to build you own framework ? Frameworks are conventions CI has many problems in logic an in OOP as we all know … I really can’t understand why somebody that has a high programming IQ would use that ![]() | |
Re: First you must create the plain PHP object , its properties should be private and the getters – setters of it should be public , then you create an assigner to assign the values of the array to object using its setters. If there is a name conversion between the … | |
Re: PHP has set_error_handler http://php.net/manual/en/function.set-error-handler.php If you use that along with a proper try catch logic and throw – catch Exceptions you can deal with most PHP errors and exceptions , not all of them (see more on the link above) | |
Re: You could just create an array in the programming side containing the level as key and the lexical of it as value e.g.: // The level as you got it from db $level = 3; $levelLabels = array(1=>"newbie",3=>"mod",5=>"admin"); echo $levelLabels[$level]; But … in my point of view the authorities is … | |
Re: Have you any knowledge of parsing an html document with PHP or should we started it by that? If you don’t, have you tried parsing an html document, and if you did , what was the problem of extracting og tags? | |
Re: There could be many implementations depending on architectural views. I have worked for many years in one pure OOP language in an architecture where inside the db objects where queries. From that I’ve gained my opinion of never doing so. I will give you a small example of how to … | |
Re: Notice that both functions are deprecated and therefore shouldn’t be used when you are programming new code. There could be a discussion comparing PDO::FETCH_ASSOC vs PDO::FETCH_OBJ and if is a good OOP practice what PHP is considering anonymous objects but that is far from what you are asking so I … | |
Re: Stored procedures rarely have to do with security and certainly not in your example. Of course you should use prepared statements along with PDO for example but you should validate data both client side and server side. Creating a stored procedure for a single statement doesn’t make any sense other … | |
Re: You follow instructions that you don’t understand and you are asking why it is not working? What is programming a magic ball? Why the simple … understand what you are doing isn’t your first priority? | |
Re: Is this a test ? … If it is than just checking php.net as noticed you could have the answer. The only thing that could make any sense related to that question is what is the error – exceptions handling according to error types in PHP, but that seems far … | |
Re: mr.unknown maybe you think that programming can be learned with two sentences in a forum , but it can’t. You have installed wamp as you said , that is a step , go around search in web , try , test , make your errors , if you have curiosity … | |
Re: What is your question exactly? What are you trying to do? Describe the problem and the solution you are thinking. | |
Re: There are really (really) few occasions when a query inside a loop is needed. In this case it seems like you taking the emails (sf.email_address as you say) from a query above; in that case a single join query in indexes would do the job. Even if you retrieved this … | |
Re: See a language as a product in its historical background. Programming languages always could output something, but if you wanted to output “hello name” all of that should be inside the program. The ambiguous concept of “server side scripting” wasn’t there and PHP as a Perl templating system arose. From … | |
Re: Yes there are many reasons , the first is that you mix the view with the logic , the second one is that you are using mysql_fetch_array that is deprecated and really bad practice many-many years now , the third one is that you use brackets as if is something … | |
Re: Well the time has come that you can try web sockets. I strongly believe that this is the future if . 1 you have a good OOP background and 2 . you can make modifications in your server. The first one can be bypassed but to be honest web sockets … | |
Re: Andrica please rephrase your question , it doesn’t make any sense. Explain more what are you trying to do, what you have done so far , where is PHP a part of it and what is your question about PHP … | |
Re: Where is the virus that you are checking, in your server? Or is just a questioner of users systems viruses that each user has to complete? | |
Re: To be honest that is a very bad code using PDO, why the table names are constants ? . Why that isn’t a data worker with sql statements and functions to work with them ? Why , because you use the same PDO flow don’t you have a PDO child … | |
Re: You must provide your data structure to give you a credit opinion. One idea could be to make a select concatenating the answers ids of each user ordered by the question id (maybe using group_concat). Then making an outer select to it grouped by the concatenated column having a counter … ![]() | |
Re: Of course it is just my opinion but: `isset($_POST["item"])? $item = $_POST["item"]:$item = "Not Set";` Just mean bad and messy code, there is no reason why the same can’t be written cleaner e.g.: `$item = isset($_POST["item"]) ? $_POST["item"] : "Not Set";` | |
Re: Priteas is of course right a switch statement could do the job , but I am not a fun of switch statements in any language so for me an if – else if – else still is great . BUT : here what you are doing has no logic inside … | |
Re: PHP is a programming language; ASP is a frame where other programming languages can use. If the question were VBscript (that most ASP pages are using) vs. PHP we could talk a lot about it. But there is no really VS in programming languages. A programmer should know many languages, … | |
Re: Also I can’t think a proper way that can be done. But a cheat answer would be to redirect a request to the same url if it hasn’t been redirected yet, server side with PHP and headers. The easy way to know if that URL has been redirected server side, … | |
Re: Hello, there are many ways you can learn and write PHP, OOP is one of them and you are using one other, functional. Well in PHP functional variables inside functions have a scope only inside them, if you want to use them in a global manner you should declare that … | |
I have a .htaccess plus PHP question and I am trying to find the answer my own over last months. Of course I have asked friends programmers but they have no clue about it. Because I have this question for many months I am not sure that I haven’t posted … | |
First of all let me clarify that I am programmer and that my knowledge in system administration are limited ( I know more than that limited spectrum but I wouldn’t trust me on those ). This idea arose out of two deferent needs , I have a dedicated server in … | |
| |
Re: Search engines are you friend. What you are asking to retrieve the data of a web page or to forward the user to that page? | |
Re: I have never tried such thing. PHP is compiled in C, to have PHP call the compiler is not the logical way to go. What is the need to use PHP on that, do you want the compilation to occur when something comes from net. And maybe the answer is … | |
Re: There is a clear barrier, don’t server content ONLY with JS. That doesn’t mean actually that you can’t change the content of the page , but if you do be sure that you serve the same content in a page (without JS). The second barrier I always have in mind … | |
Re: And the PHP code that you are trying to retrieve a DB rs ? |
The End.