-
Posts
1,033 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
Try posting your code so we can see what you are talking about. Be sure to use the code icon (<>) and select PHP.
-
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".
-
Converting it to date format is then relatively simple.
-
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.
-
Yep, your code is broken.
-
Outputting MySql data that contains ' into php variables
gw1500se replied to Adamhumbug's topic in PHP Coding Help
I believe you want to run that data string through htmlspecialchars. -
There are all kinds of pagination tutorials out there. Just google 'php pagination tutorial'.
-
That is the GUI version of 'git branch -merged'.
-
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.
-
Unsubscribe script not deleting database entry for user
gw1500se replied to UAFWolfcry's topic in PHP Coding Help
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' -
Unsubscribe script not deleting database entry for user
gw1500se replied to UAFWolfcry's topic in PHP Coding Help
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. -
Unsubscribe script not deleting database entry for user
gw1500se replied to UAFWolfcry's topic in PHP Coding Help
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. -
From command line: mysql -u <root user> -p >use test; >show tables; Post that output.
-
What is the error?
-
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.
-
need to call my php script from javascript
gw1500se replied to thehubclick's topic in PHP Coding Help
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. -
Use the date function to convert it to the needed formatted string.
-
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
-
If I understand correctly, you need to see if the hour has gone past and if so increment the date.
-
Then it is not a max packet size issue. Post some code so we can see what you are talking about.
-
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.
-
Reading the manual will help a lot.
-
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.
-
Setting option in a select dynamically with PHP
gw1500se replied to Adamhumbug's topic in PHP Coding Help
So what is your question or what is the error? -
display pedigree table fron mysql with php by levels
gw1500se replied to logandro's topic in PHP Coding Help
What have you tried and what is not working?