648 Posted Topics

Member Avatar for daniel.conlinjr.1

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 …

Member Avatar for jkon
0
82
Member Avatar for Muhammed Waseem

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 …

Member Avatar for diafol
0
224
Member Avatar for msz900

what is ./header.php or ./footer.php? Is it possible that you do something to the session there ?

Member Avatar for jkon
0
304
Member Avatar for cgull

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 …

Member Avatar for jkon
0
219
Member Avatar for ruhestorer

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 …

Member Avatar for ruhestorer
0
12K
Member Avatar for mmcdonald

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 …

Member Avatar for JorgeM
0
262
Member Avatar for anestistsoukalis

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 ?

Member Avatar for anestistsoukalis
0
179
Member Avatar for jennstudent

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 …

Member Avatar for jennstudent
0
220
Member Avatar for harry_2

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 …

Member Avatar for jkon
0
249
Member Avatar for ovidiu_b13

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. …

Member Avatar for diafol
0
5K
Member Avatar for best4earn

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 …

Member Avatar for jkon
0
153
Member Avatar for vicky one

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 ?

Member Avatar for broj1
0
206
Member Avatar for best4earn

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 …

Member Avatar for jkon
0
297
Member Avatar for Myronz

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 …

Member Avatar for jkon
0
286
Member Avatar for dany12

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 …

Member Avatar for diafol
0
192
Member Avatar for Dani

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 …

Member Avatar for EvolutionFallen
0
273
Member Avatar for PF2G

You forgot to mention the problem . I can see many problems in this code , but what is the one that is troubling you ?

Member Avatar for minitauros
0
155
Member Avatar for Dani

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

Member Avatar for diafol
0
1K
Member Avatar for sobias

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 …

Member Avatar for jkon
0
249
Member Avatar for fheppell

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)

Member Avatar for jkon
0
152
Member Avatar for ImZick

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 …

Member Avatar for ImZick
0
376
Member Avatar for apnavarun

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?

Member Avatar for veedeoo
0
345
Member Avatar for klemme

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 …

Member Avatar for jkon
0
201
Member Avatar for jasminjew

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 …

Member Avatar for veedeoo
0
378
Member Avatar for riahc3

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 …

Member Avatar for riahc3
0
643
Member Avatar for geneh23

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?

Member Avatar for geneh23
0
372
Member Avatar for chrispitt

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 …

Member Avatar for jkon
0
244
Member Avatar for mr.unknown
Re: php

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 …

Member Avatar for jkon
0
256
Member Avatar for vizz

What is your question exactly? What are you trying to do? Describe the problem and the solution you are thinking.

Member Avatar for harry247
0
794
Member Avatar for Vijaysurya

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 …

Member Avatar for jkon
0
282
Member Avatar for rajhoq12

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 …

Member Avatar for <M/>
1
501
Member Avatar for wolfgangcs

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 …

Member Avatar for masterjiraya
0
598
Member Avatar for firelife12

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 …

Member Avatar for masterjiraya
0
225
Member Avatar for andika.kurniawan.121

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 …

Member Avatar for jkon
-1
70
Member Avatar for cssweb
Member Avatar for bassanio

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?

Member Avatar for jkon
0
121
Member Avatar for zerotolerance
Re: PDO

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 …

Member Avatar for jkon
0
122
Member Avatar for adishardis

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 …

Member Avatar for diafol
0
281
Member Avatar for milkman93

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";`

Member Avatar for jkon
0
196
Member Avatar for mbarandao

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 …

Member Avatar for mbarandao
0
191
Member Avatar for asifalizaman

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, …

Member Avatar for jkon
2
250
Member Avatar for vizz

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, …

Member Avatar for vizz
0
2K
Member Avatar for Tomashqooo

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 …

Member Avatar for jkon
0
254
Member Avatar for jkon

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 …

Member Avatar for jkon
0
239
Member Avatar for jkon

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 …

Member Avatar for JorgeM
0
424
Member Avatar for garyrichard
Member Avatar for johang_80

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?

Member Avatar for IIM
0
169
Member Avatar for sharmilli

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 …

Member Avatar for vars
0
934
Member Avatar for guyinpv

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 …

Member Avatar for guyinpv
1
459
Member Avatar for daniel36

The End.