Jump to content

gw1500se

Members
  • Posts

    1,029
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by gw1500se

  1. I believe you want to run that data string through htmlspecialchars.
  2. There are all kinds of pagination tutorials out there. Just google 'php pagination tutorial'.
  3. That is the GUI version of 'git branch -merged'.
  4. 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.
  5. 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'
  6. 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.
  7. 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.
  8. From command line: mysql -u <root user> -p >use test; >show tables; Post that output.
  9. 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.
  10. 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.
  11. Use the date function to convert it to the needed formatted string.
  12. Convert the date string to a time data type then compare: if(strtotime($test_date) < strtotime("now")) { $new_date=strtotime(&test_date. "+ 1 day"); } // format $new_date however you need
  13. If I understand correctly, you need to see if the hour has gone past and if so increment the date.
  14. Then it is not a max packet size issue. Post some code so we can see what you are talking about.
  15. Did you check for errors? If you exceed the max packet size you should see error 1153. If you need to change it, set 'max_allowed_packet' in the ini file.
  16. Reading the manual will help a lot.
  17. Sorry by my clairvoyance is not working today. Perhaps if you posted some code it might help. Be sure to use the code icon (<>) and select PHP.
  18. I think the OPs small matter goes a bit deeper. Probably needs to do a lot of learning of HTML and PHP.
  19. PHP keeps the original data type unless you specifically change it. Thus it will always be data type float and will output 0.0. If you want it to be blank then add a check to see if it is 0, if it is then do not output the variable. Because you didn't use the proper code icon (<>) I am not going to wade through that difficult to read code but wherever you are outputting that variable, add the 'if' block.
  20. I failed to mention that if you have admin privileges you can create rewrite rules that protect the directory containing member only pages. But that is not a pure PHP solution but rather an httpd configuration solution.
  21. Use sessions. Each page will need to check a session variable to determine if a user is logged in. If so deliver the page, if not deliver the login page or an error.
×
×
  • 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.