Jump to content

birbal

Members
  • Posts

    2,543
  • Joined

  • Last visited

Everything posted by birbal

  1. you can set that column as " is NULL" in database to accept NULL values. as EPOCH time starts from 1st january 1970. intially it starts from that date if you dont provide any.
  2. http://w3schools.invisionzone.com/index.php?showtopic=44106&view=findpost&p=245750 you can find it here
  3. birbal

    PHP Styles

    It will be quite same like the CMS you have made. You have built CMS to use a HTML template to get data from database and populate the page. here you need to use a css file as template where user chanagble things will be in placeholder and the data will be pulled from database.
  4. are you sure you are requesting the correct file? confirm the path even the file name with extension. If path is correct and browser have correct plugin installed to play avi file it should have play it.
  5. Renaming just the extension wont convert the file to avi to mp4
  6. are you using localhost or 3rd party web server? if it is localhost you will need to install sendmail like mail server and set the setting in php.ini "SMTP" to point to sendmail executable binary file path. If it is 3rd party server it is probably already installed, in that case contacting your server admin would be the best option.
  7. First of all it is not the correct forum for this issue. it is for Critiques of what members made(site applications). General forum is good for any general question or if you know which specific language you are going to use to solve your problem, the specific language forum is also good to go. To get notification via facebook you need to setup a application for web usage in FB. you also need separate backend system to store information about your employee. Your all employee should have subscribed to that appliction to get notification. When user sends you any query ( i assume you will use web form) you will processed the form natively and will get all the employee ids or specific employee id from your Database and when you have id of their fb profile you can send notification to your employee via FB API.
  8. where did you change them? you need to change the php.ini file which php is loading. check in that php.ini list what does the location shows in "loaded configuration file" ? that is the file you should edit.
  9. birbal

    e-mail sanitization

    Santinizing means removing the unwanted characters and pass the rest of the thing. where validate means wither it must be right or it will not be passed. Both comes into data filtering. when we need to filter something obvious where some little change can change the meaning of it, we use validating (like email) http://in1.php.net/filter there is some prebuilt filtersalso you can use preg_match() with some regular expressionIf you do it using regular expression always validate against whitelist of characters. info about regular expression http://regular-expression.info Filtering is crucial to any application.
  10. what does it show when you tried to print it? error? how is your array is strcuctured? you can use print_R() or var_dump() if you want to see the structure of array. if you need to show all array element regardless of its structure loop is way to go. if you want a specific element you need to know the structure of array
  11. 1) Generating a random number between 1 to 32) Initialize Database connection3) Execute query get all fields from mybook where id is the generated random number4) fetch the PDOStatement object as associative array Initialize Database connectionexecute the query which creates tablecreate an array of book name and author key value pairloop through and make variable out of the array to store title and author escape the inputs of author and title insert it in DB You could figure it out on your own if you look into the corresponding class and functions. check the php manual for corresponding refference.
  12. He is helping. Have you even tried the suggestions he made?
  13. You can just include the header file in other file without using any function. I barely will use any function to just print something. You can set up the header as part of template with placeholders and use the whole generated template to get evaluated its value.
  14. htdocs is your web root. php file will (commonly) only be executed through web server. thats happens when we use localhost to get pages from web root. if you try to open it using file system it will be shown as plain text. but as html files are not dependent on web server to get interprete it dont need to be in web root to see it properly. if you use filesystem to open the file in browser the text will be interpreted as html and will show it in browser. but if you want to be publicaly available you need to put it in web root. usually both are being saved in web root.
  15. check what move_upload_file() is returning. add some debug statements. if $_FILES['file']['error'] is not showing any error that means it is getting uploaded to server but not geting saved.
  16. You are trying to acces element which does not exist. $row will have current row as associative array when you use mysql_fetch_assoc() and will move internal pointer ahead. you are using that function once so it will give you one row and will move the p[ointer ahead once, thats all. you need to loop through the result set
  17. html is markup language which is used to format the page. it is not programming language so it cant to do any calculation. when we see page in browser it is responsible by HTML but when we send data to form and process it server side language like php is used. Form processing has invovlvement with calculation and logical desciions so it needs to handle by programming lanuage. .html is for html file and .php is for php file. by default .html file can not be executed as php flle. You can serve static html file to show up data and then process it in php file but only when you dont need to show any dynamic content in first place. When we use php to show html page it just interpreted by php and it outputs html. so if static html is used it can reduce overhead of php interpretion where it is not needed
  18. What do you expect to happen instead? does your file is being saved in server? did you check the filesystem? i cant see anything which can output. you also like to use debug statements to ensure what is happening.
  19. PHP manual has example use of those functionjust type this in browserhttp:// php.net/FUNCTION_NAMEand replace FUNCTION_NAME with the function name. this will lead you to the function manual eg file() http://php.net/file
  20. you can use file() nwhich will return an array of line in file. after that you can use explode() to get an array of daata which are delimited by "|" you can also use glob() to get list of file in directory. there is also function for hadling csv files fgetcsv() fileputcsv()
  21. It will nedd involvement of JS. There is many ways to do that. one would be, when user try to draw a square, they click on a place and keep on dragging the mouse. so you can catch click cordinates and mouseup cordinates. once you know the both co-ordinates you can calculate the length of between them and even the other two cordinate of rest of to points of square/rectangle (use cordinate geometry formulas). once you have four cordinates you can decide the real cordinates respective to the original image. So now you have original image dimension, crop box dimension. you can use those data to crop the image imagecopyresampled() and save it.
  22. You can use issset() to determine if any variable exist or not. if exist then show up it. if you want to know your query is really returning rows or not, you can mysql_num_rows() or equivalant method of other api(mysqli/pdo) It is not rectangle, it is open and closed square bracets of array notation.
  23. Your server probably using "implicit flush", so thus it is outputting anyway.check the setting
  24. Use anchor name as post id like <a name="pid12334"> when you print the posts. and use that id as anchor in link which will take user to it http://somesite.com/post.php?forum=13&action=getpost#pid12334
  25. If it has been imported the data should have been displayed. Start debugging it and see if it is telling you anything or not. Either check your error log or enable error display with error reporting to highest level.
×
×
  • Create New...