648 Posted Topics
Re: Hello, You must understand that you don't ask about how to use web services in PHP but what is going wrong with the specific tutorial that you read. That means that if someone will answer will have to read that tutorial , try it see if there are any errors … | |
Re: There are two main issues in your question. The first has to do with the use of mysql functions , that are deprecated and removed in new PHP versions , so of course every project that uses at least deprecated feature of a language is in serius problem. The second … ![]() | |
![]() | Re: You have 24 lines of code (along with empty lines) and I could make more than 30 fast comments of why this MVC implementation has serious problems. But lets stay in your question , do you know how to perform an AJAX request? Do you know how dynamically change the … ![]() |
Re: Your problem has nothing to do with modal windows (that I don't see anywhere in your code). Client side you have js , css and html (served by server side), and server side you have PHP. Have you created a modal window and that one doesn't work ? Create an … | |
Re: You wrote that you declared the variable $knowyou in the top of the code , you didn't . You just have a comment there with the variable name that doesn't make any sense @see http://php.net/manual/en/language.variables.php AND @see http://php.net/manual/en/language.basic-syntax.comments.php . Now back to your code, when you want a variable to … | |
Re: Hello, as diafol wrote (twice) the way you are doing it keeps only the last record data. @see foreach at php.net . There are many ways to do it client side without all these hidden fields (e.g. data attributes in the option) but there is many simpler (and more secure) … | |
Re: I am writing this no as response to the question that smells like a test , I am writing it because I believe that there is a bad perception for php functions as arguments (I hate PHP that way and luckily PHP hate itself as well) . I will give … | |
Re: Diafol answer is (of course) accurate and enough. I hope he don't mind I wrote one more example using a very simple view component HTML generator class for tables. <?php $database = "test"; $username = "testuser"; $password = "testpassword"; $db = new PDO("mysql:host=localhost;dbname=".$database , $username, $password); $statement = $db->prepare("SELECT * … | |
Re: What would happen if internet cease to exist is that we (as human kind) will built it once again. I am a bit troubled of how this would be done , because the way internet was developed is pro freedom of speech and knowledge sharing (despite the failed and some … | |
Re: Luckily earth will run out of petrol and gas before we destroy it completely ... All these environmental agreements isn't really any progressive step forward , but just a rough look to a near future with no such energy resources. Earthquakes and volcanoes are natural disasters ( I have some … | |
Re: It would be great if you first explained what you are trying to do and then describe of how you are thinking to do it. As I understood you want admin to be notified when a user upload an image , is that so ? | |
Re: Stefan_1 there is the concept of repository that works together with db. Very quickly how it works : we have a folder named repository above public_html (not accessible through browsers) there we can have sub folders for the different scope of the image / file. Then we have a main … | |
Re: What is you db schema regarding users ? (SHOW CREATE TABLE x) | |
Re: Once upon a time there was a belief (with no real facts supporting it) that search engines treat .html better than .php in URL's (so you could generate a .html through PHP) . Now days friendly URL's have dominated , and there is no more many .php , .html , … | |
Re: lewashby as I understood you are programming in PHP in one block pure in procedural way. I will not start explaining how OOP or even differentiating the view from the other parts of the app would help because this would go a way beyond what you are asking . Here … | |
Re: Actual “thesis” means your point of view in something that you feel and understand quite well about it. Having others proposed a subject for a “thesis” doesn't make any sense | |
Re: Hello chaitu11, First you must make a question , not only the in the title of your post. Secondly would be great if you explained what you are trying to do and how are you trying to do it. Only from the title I “guess” that this question has nothing … | |
Re: Stefan_1 would be great if you read once again what HTML is , what is JavaScript and what is server side programming languages like PHP (believe me this could help you a lot more than just solving this). I started writing an example in this answer but then I noticed … | |
Re: <?php $timeInString = "5:00 PM"; // @see http://php.net/manual/en/function.strtotime.php $timeStamp = strtotime($timeInString); // @see http://php.net/manual/en/datetime.construct.php $dateTime = new DateTime(); // @see http://php.net/manual/en/datetime.settimestamp.php $dateTime->setTimestamp($timeStamp); // @see http://php.net/manual/en/dateinterval.construct.php $dateInterval = new DateInterval("PT5H"); // @see http://php.net/manual/en/datetime.add.php $dateTime->add($dateInterval); // @see http://php.net/manual/en/function.date.php $result = $dateTime->format("g:i A"); echo $result; //10:00 PM ?> | |
Re: First be ready to run PHP (XAMPP WAMPP or whatever) then a decent PHP IDE (Eclipse , Netbeans , PHPstorm ... what ever). Read many tutorials and on line books (don't take every word for granted if you don't test it). Decide a test project and start working with that. | |
![]() | Re: One more vote for Eclipse. From time to time i check other IDE's , I still haven't found something that just checking it a day , made me think “I don't have this in Eclipse and I need it” or , “this is really better than Eclipse” , I am … |
Re: Nathaniel there are many things in your code that I have comments . Before organizing objects in collections first you should understand what you are doing (in my opinion). You have an object that you call it Country there your argument have many inconsistencies. You pass some with capital the … | |
Hello, I made a WebSocket service in Apache under CentOs with PHP and JS that works great if the protocol is ws:// . The problem is that the site is served through https:// so I must use wss protocol (cause mixed content policy). I have tried many approaches to make … | |
Re: I believe that this post is live only because the author didn't marked it as solved , he made a second post in this sequence with another approach , so it isn't really an active thread. @philjen it is great that you want to help others and I hope you … | |
Re: As I understood you save dates in your db as timestamps int(10) so the first thing you have to do is finding the timestamp the day before yesterday. If you just want 48 hours before a current timestamp it is very easy, get the current timestamp with `date("U")` and then … | |
Re: Why are we talking about that ? It is quite simple and elementary , or save the files in the first step as temp or have the form in one step , what the need to talk about more complicated solutions ? | |
Re: because view has nothing to do with a programming lannguage (other than it populates it) ... this question would be great for the CSS section of dani . But to be honest maybe there are more in the background to this , maybe the creator of this trhead don't understand … | |
Re: http://php.net/manual/en/reserved.variables.session.php If you have any questions about it we are here , but (please) take a minute to read first ![]() | |
Re: It seems from your code that you don't know much about functional programming either. So what is your question exactly ? | |
Re: It seems from your code that you don't know much about functional programming either. So what is your question exactly ? | |
Re: To be honest I didn't understood how you know product ID's if the reseller end don't communicate through some other ways with the seller end? If there is some other way of communication behind the scenes you could provide that , and it might be really better solution using that … | |
Re: I suggest to view this demand from another perspective. As I understood you just need to configure your domain for wildcard subdomains (just Google it, and if you have any question here we are). Than what is missing is finding from the URL the subdomain , find if this is … | |
Re: Doesn't that framework has a community ? It seems that you are not asking anything that has to do with PHP code but only about the architecture of that framework , so I believe it would be best to ask them | |
Re: This seems to be a very touching thread and as such I feel the need to spoil that feeling ;) . No , you should fear Gideon. You are entering a high competitive world , that even if there is a certain ethos among programmers there are always the tend … ![]() | |
Re: PHP is a multi-paradigm programming language . Even its object oriented face has many moods that sometimes look like Java sometimes like C++ and other times like a bizarre mix. I start with those phrases to emphases that there is no “correct” way of OOP in PHP (except you are … ![]() | |
Re: I hope that you don't mean an actual WS / WebSocket because if so you have got it all wrong. If on the other hand you are just trying to create a socket connection through web then you are almost there (even thought you don't bind your socket in an … | |
Re: I use question mark placeholders with PDO but why do you have single quotes around :user in your SQL statement ? | |
Re: What exactly are you trying to open to read ? $_FILES["file1"] is not a file path at any matter , it could be (if you really uploading a file) an array containg info about the uploaded file , where $_FILES['file1']['error'] is the error (status) and $_FILES['file1']['tmp_name'] the file path if … | |
There is a problem with static variables and functions in how it is used by apps and frameworks in PHP , they are used as global functions or parameters while this is by far what they mean. It is easy to write the same functional or even procedural code in … | |
Re: There is really no reason to write functional PHP in OOP style. Everything here is static , so could be functions as well (static in OOP means other things than Session:: Form:: or Input:: or things like that). You want to log out a user (I believe in its current … | |
Re: This question and the answers given , puzzled me . Let me remind that the question is “HELLO i would like to ask that fetchAll() is good choice to retrieve all user message from database or i should use while loop? I asked this question because i worry about internet … | |
Re: In line 19 you have code inside the class but outside any method . Probably you meant to close the class first and then use it. | |
Re: duplicate: https://www.daniweb.com/web-development/php/threads/496009/cant-figure-out-what-is-the-error-getting-msg-parse-error-syntax-error No reason to post twice | |
Re: You said -browser it shows only "an error occured " . Of course this is an extremely ambiguous message for everything. Do you mean that the browser alerted that message ?. In your Js you have the same message alerted in Ajax error. Did you tried to output (alert or … | |
Re: http://php.net/manual/en/pdo.lastinsertid.php What exactly is there that you don't understand phoenix254 ? | |
I am posting it here because I would really like to read other opinions. I am creating a module for a framework that anyone could install in its system and behave the similar (almost) way. I am starting with that because it is important that I don't control system settings … | |
Re: Actually using superglobals always might not be a good idea. Lets suppose that we have a class that does something with data that normally came from $_POST , there is no reason why not supplying those data (and instead use the $_POST superglobal) , maybe in near future we want … | |
What is your current motto? What phrase would you use as motto in this current period ? Mine would be “think, but don't overdo it. Act” ![]() | |
Re: Storing a string in db from JSON decode has really no meaning at all. The only case I can think of that might have some reason is storing data that you don't know what you do with them but you don't want to loose them because might be precious to … |
The End.