Jump to content

gw1500se

Members
  • Posts

    1,041
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. First please use the code icon (<>) and choose PHP. It makes your code much easier to read. Which is line 118? Did you echo all your variables to make sure they contain what you expect?
  2. Javascript screen.height and screen.width will give you the measurements regardless of device type. From that you can calculate how you want to distribute the screen real estate. Pass that info back to PHP via Ajax and set up the output as desired.
  3. I'm not sure what you are asking. If I understand, simply convert the integer to a string (strval) then test the first character of that strnig and take the appropriate action.
  4. You can either set_time_limit in the script which applies to only that script or max_execution_time in your php.ini file which will apply to all scripts.
  5. First please use the code icon (<>) for your PHP and select PHP or HTML for that code. It makes your code easier to read. Did you echo $value1 to make sure it is what you expect? As a guess, since you don't show that code, I suspect the problem is with the array $characters. Did you var_dump that to make sure it is correct?
  6. If you are getting a blank page then that means neither 'echo' is working and the code may be failing somewhere else. However, if the 'fputs' is outputting invalid HTML then that may also appear as a blank page. When that blank page is up, show the source to see if anything is there at all.
  7. What is the error you are getting? Is error reporting enabled? Did you output the data to make sure it is what you expect?
  8. You are mixing POST and GET. If you want to pass the variables in the URL use GET. You need to output the variables to the form to a field not in the URL. As Barand said it should be in a hidden field if you don't want it displayed on the page.
  9. Try posting your code so we can see what you are talking about. Be sure to use the code icon (<>) and select PHP.
  10. Minor point. I think the check will catch negative integers since it is cast to a string but the error should say 'Please provide a positive integer".
  11. Converting it to date format is then relatively simple.
  12. I recommend you convert those to date format. Not a difficult task that needs to be done only once. It will make not only this problem go away but any future code that needs to use dates will be easier as well.
  13. Yep, your code is broken.
  14. I believe you want to run that data string through htmlspecialchars.
  15. There are all kinds of pagination tutorials out there. Just google 'php pagination tutorial'.
  16. That is the GUI version of 'git branch -merged'.
  17. As you have already surmised there is no git forum here. You probably need to subscribe to the git community. That being said if 'git branch --merged' does not give you what you want then it may not be possible.
  18. So the action is from an email? PHP is probably not the best solution for processing an incoming email, IMO. In any case the hash is probably what should be used for the delete. Something like: DELETE FROM email_user WHERE hash='$hash'
  19. Depends on what the schema looks like. Something in on the page passed back when the delete is activated should uniquely identify the user to be deleted. Perhaps you should post the schema and explain what you want to accomplish.
  20. This is really a MySQL question and belongs in that forum. However, I think your delete query is missing 'FROM <table name>'. You should be checking for errors after any query and handling them appropriately.
  21. From command line: mysql -u <root user> -p >use test; >show tables; Post that output.
  22. What is the error?
  23. No need to loop through anything. If you just need a count of various criteria you can do it with a MySQL query using the COUNT parameter. I suggest you ask on the MySQL forum.
  24. First please use the code icon (<>) to embed it in a post and choose the correct code format. It makes your code much easier to read. Second, there are several ways to accomplish what you want. Probably the most common way is to include the javascript in the PHP page you want executed. Run the javascript and return true or false then test that in the PHP code to determine if the data meets the requirements to run the script. If not then output an error or something, otherwise run the code. If you really want to execute a PHP script from javascript then you need to use Ajax. Just search for "PHP Ajax" and you will find plenty of references with examples.
  25. Use the date function to convert it to the needed formatted string.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.