Jump to content

birbal

Members
  • Posts

    2,543
  • Joined

  • Last visited

Everything posted by birbal

  1. Local server does not need internet connection to work. your computer basically sends request to itself. mail returns boolean true on success anda false on failure. check the behaviour of mail() details here.http://php.net/mail Though returning true does not ensure sending of mail. it depends on mail server installed on the machine too.
  2. birbal

    CREATE TABLE error!

    You have table name missing in SQL
  3. different installation have different location of sendmail binary. Xampp uses INSTALLATION_DIR_OF_XAMPP/sendmail/ where as WAMP does not come with any.What DD was sugesting is probably location of unix server. If you are using any packages check if it comes with sendmail or not. if they come with one you can find the location in their documentation page. If you had custom installation of apache php, sendmail will not be installed. in that case you need to install sendmail manually and use the location of that binary in php.ini
  4. That would not be accurate all time. tarffic heavy/ or moderately heavy site where there is concurrent insertion the value will be changed till user request again page. mysql function LAST_INSERT_ID() will give you last inserted id accurately. It gives last inserted id of current connection. incase you need to pass the id to other page it can be sent via GET,COOKIE,POST,SESSION as you would do with passing other id.
  5. VarChar would be inefficient. Best will be to store it as ineteger timestamp. inetegers are always good to work on. more over it storing timsetamp will let you swicth between timezone just changing the timezone in php. though there is dedicated data type to store date and time (see the reference in their site about DATE and DATETIME data type).
  6. Insertion should be the same as you do with normal script. you need to make sure that anchor tag is pointing to that script.
  7. birbal

    updating the e-mail

    If CrID is primary key , you can use that alone to determine unique user in your update query. In your code $email will be same for the new one and stored one (use in SET and WHERE) so it will not match if user is trying to change his email to other one.
  8. you need to use join for thathttp://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CDIQFjAA&url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.0%2Fen%2Fjoin.html&ei=sFlZUYzUJYLqrQfGyIDIDA&usg=AFQjCNGXZQycUZ9UHnvO4i2-l6UslF5wRA&bvm=bv.44442042,d.bmk
  9. birbal

    Pagination

    how about searching it in Google?
  10. You did not mention what is hppening instead, what does it show, errors. If you have outputs already made it should not send headers second time and show some error. does it show anything? make sure you have error enabled to show all level of error
  11. you can use static::YEY which resolves to current calling class.
  12. birbal

    deleting from the db

    you need to check the value and act accordingly. if it is not empty only then print it. it can be null ,empty string or 0. your app can decide what does they represents and act upon them. i told null because it would be more relevant/appropiate to this.
  13. It depends. difference in Server specification like processor,RAM and the number concurrent request is being processed in shared server by multiple site. I would just leave it to hosting provider and wait for a email from to upgrade to dedicated host. If your site is consuming much of resources not only you other site on the same server will be affected and hosting providers keep on hard watch on that for same reason. If your (pre hosted)app need more resource they will let you know. It is true if your concern is regarding resource consuming of your existing apps. if you need features like (APC,memcache, or exec() to name a few) you will probably need dedicated server from the begining. Regarding bandwidth some host charge for extra bandwidth some ask for upgrade to dedicated host.
  14. birbal

    deleting from the db

    you can update the age directly. you can set it as NULL to represents user has not entered anything or deleted age data.
  15. Something like that i was thinking before. good to hear from you. i also was not aware about red hat. thanks for the inputs everyone. I will see what could be done on this.
  16. Technique for salting is same regardless of hashing algorithm. Problem is in the algorithm itself in md5 or sha1. If an attacker able to crack the hash (hashing algorithm) salting will have no use. they can easily figure out the pass from that. salt is used so that two same password in server (same or different) never will look same when they have hashed. you can use crypt() which supports sha256,sha512 and blowfish (recommended). it also supports iteration which will make it more secure. the longer the time will take to hash, more better. you can set a server specific salt with some user specific salt. there is previous discussion about this if you search the forum. http://php.net/crypt
  17. birbal

    deleting from the db

    I belive you need UPDATE instead of DELTE unless your user age represents whole row. Delete does delete whole row. or i am missing something?
  18. I dont understand that like why IPB boards is successful where as they are quite same (as per feature) open source software like BB and others. I am mostly concerned towards open source software. If something is free and do the same job no one will pay for other. which license restrict to use open source software as SAAs? I worked alone on this. so i don think it will vouch for that i can work with other developer (which i have no experience) , if i make this open source. actually I am more interested to start it as SAaS.
  19. There is almost everything which was previously developed and running well. does it make sense to make another application on same? can it be commercially beneficial?eg if you look into popular CMS they have most of things already built in either in core feature or as add-ons, I tried to ask myself that why should any one built a custom solution to a problem where there has been already a solution. Even there is existing solution still people developing custom one from scratch for commercial purpose. why? I am into something that i built from scratch and wish to used as SAaS later. That started for mainly portfolio enhancement but there was little intention to use it for commercially later. I am little aware of software licesncing or marketing. as far i know open source software cant be use as paid service. I beilve thats apply to all of open source genre incluidng popular CMS? There is kind of same addon (not sure it was paid or free) of what i am doing in some CMS and some open source solution. will it be wise to push it to commercial purpose or getting revenue somehow? how should i approach? or it will not click as commercial apps and best i can use it as portfolio enhancement and make it open source? any other insight about it would be helpful. please share your views and experience on it.
  20. You can deploy a fallback without much of effort if you plan it well. so why not give a chance to user for graceful degradation. your user still can use the app even if they don't have JS (like mobile users). you can set a warning message though to notify user that they are using degraded version of your site.
  21. php.net OOP documentation is quite comprehensive.Its tell you how to use them and behaviour of them. There is books about PHP OOP if you google them you can find lots. OOP is like tool it is the design patterns which tells you how and when to use them appropiately. I found "Head first design pattern" and "Head first object oreinted analysis" very helpful for that. There is also other book , even you can find language specific design patterns book like "PHP Design pattern from wrox publication"
  22. yes it is true it dont need to declare explicitly variable as array, as same with other data types in loosly type language like PHP. No one here is confusing OP. It was certain that the issue was not for variable declaration. its not about it wont work or would throw errors, its about best practice which people should follow.
  23. Yes, I agree on that.@OPwithout initializing $itemsthis would throw Notice which should be avoidedYou probably have error reporting in lower level or it is off to show. If you set (Recommended for developing) "error_reporting:E_ALL" and "error_display:on" in php.ini, it would show all the errorsincluding notices.
  24. You have return statement inside your foreach loop which is causing to break the loop and exiting from the function on first iteration even if there is more element on the array.
  25. birbal

    Need help

    You can also use net tab of Firefox firebug or equivalant net debugger to determine broken links.
×
×
  • Create New...