648 Posted Topics

Member Avatar for Subrata_1

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 …

Member Avatar for Subrata_1
0
296
Member Avatar for gtel

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 …

Member Avatar for diafol
0
146
Member Avatar for anmol.raghuvanshi1

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 …

Member Avatar for anmol.raghuvanshi1
0
376
Member Avatar for Olalekan J

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 …

Member Avatar for jkon
0
249
Member Avatar for vampz

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 …

Member Avatar for vampz
0
351
Member Avatar for cambraydesign

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

Member Avatar for cambraydesign
0
2K
Member Avatar for Jiby_1

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 …

Member Avatar for jkon
1
169
Member Avatar for lewashby

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

Member Avatar for lewashby
0
3K
Member Avatar for ddanbe

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 …

Member Avatar for webecedarian
0
391
Member Avatar for vegaseat

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 …

Member Avatar for ddanbe
3
570
Member Avatar for UK-1991

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 ?

Member Avatar for jkon
0
145
Member Avatar for Stefce

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 …

Member Avatar for jkon
0
607
Member Avatar for zebnoon1
Member Avatar for zebnoon1
0
347
Member Avatar for hell hansen

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

Member Avatar for hell hansen
0
189
Member Avatar for lewashby

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 …

Member Avatar for almostbob
0
363
Member Avatar for _ibyang13

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

Member Avatar for jkon
0
118
Member Avatar for chaitu11

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 …

Member Avatar for jkon
-2
3K
Member Avatar for Stefce

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 …

Member Avatar for jkon
0
1K
Member Avatar for mark103

<?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 ?>

Member Avatar for jkon
0
199
Member Avatar for osvaldo_1

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.

Member Avatar for Gideon_1
0
279
Member Avatar for diafol

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 …

Member Avatar for rsleventhal
0
648
Member Avatar for Nathaniel10

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 …

Member Avatar for Nathaniel10
0
199
Member Avatar for jkon

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 …

Member Avatar for jkon
0
1K
Member Avatar for praba_web

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 …

Member Avatar for praba_web
0
11K
Member Avatar for ronjacob

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 …

Member Avatar for lps
0
232
Member Avatar for showman13

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 ?

Member Avatar for jkon
0
617
Member Avatar for tibor.marias

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 …

Member Avatar for jkon
0
256
Member Avatar for showman13

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

Member Avatar for diafol
0
358
Member Avatar for shuvobd71

It seems from your code that you don't know much about functional programming either. So what is your question exactly ?

Member Avatar for almostbob
-3
290
Member Avatar for shuvobd71

It seems from your code that you don't know much about functional programming either. So what is your question exactly ?

Member Avatar for jkon
-2
299
Member Avatar for hell hansen

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 …

Member Avatar for hell hansen
0
243
Member Avatar for gganeriwal

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 …

Member Avatar for jkon
0
165
Member Avatar for praba_web

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

Member Avatar for jkon
0
120
Member Avatar for Gideon_1

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 …

Member Avatar for diafol
0
497
Member Avatar for Nathaniel10

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 …

Member Avatar for diafol
0
443
Member Avatar for phoenix254

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 …

Member Avatar for jkon
0
538
Member Avatar for Mike Askew

I use question mark placeholders with PDO but why do you have single quotes around :user in your SQL statement ?

Member Avatar for Mike Askew
0
376
Member Avatar for Justin_14

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 …

Member Avatar for Gideon_1
0
291
Member Avatar for jkon

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 …

Member Avatar for pritaeas
0
305
Member Avatar for jonlloydd

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 …

Member Avatar for jkon
0
296
Member Avatar for blueguy777
Member Avatar for diafol
0
275
Member Avatar for phoenix254

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 …

Member Avatar for jkon
0
5K
Member Avatar for Kamal_6

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.

Member Avatar for Gideon_1
0
374
Member Avatar for Kamal_6

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

Member Avatar for jkon
0
108
Member Avatar for infoitmanoj

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 …

Member Avatar for jkon
0
332
Member Avatar for phoenix254

http://php.net/manual/en/pdo.lastinsertid.php What exactly is there that you don't understand phoenix254 ?

Member Avatar for phoenix254
0
2K
Member Avatar for jkon

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 …

Member Avatar for pritaeas
0
248
Member Avatar for dosek125

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 …

Member Avatar for lorenzoDAlipio
0
271
Member Avatar for jkon

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”

Member Avatar for Warrens80
0
322
Member Avatar for jchimz

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 …

Member Avatar for jchimz
0
405

The End.