-
Posts
1,041 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
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? -
I think the OPs small matter goes a bit deeper. Probably needs to do a lot of learning of HTML and PHP.
-
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.
-
how to go from php to html without losing login
gw1500se replied to jennhazy's topic in PHP Coding Help
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. -
how to go from php to html without losing login
gw1500se replied to jennhazy's topic in PHP Coding Help
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. -
Trouble Posting Option Select to IPN Listener
gw1500se replied to jakebur01's topic in PHP Coding Help
Use var_dump() to see what $_POST contains: echo "<pre>"; var_dump($_POST); echo "</pre>"; You can find the variable you want from that. -
Simulator made in PHP does not appear calculation result
gw1500se replied to alexndrre's topic in PHP Coding Help
Personally I would abandon trying to fix the code and instead rewrite it using PDO. Since it uses deprecated code that is going away in any case, it makes no sense to waste time trying to fix it. -
You can't just copy code and expect it to work without understanding what it does. That you are using 'wp_redirect' indicates you are writing a WordPress application. What error are you getting? Also your coding is vary hard to read and not good programming practice. You should modularlize your PHP code. A process section and presentation section. Don't embed PHP into HTML like that, build the output string in then echo it.
-
Getting the error Undefined index but the column exists
gw1500se replied to makamo66's topic in PHP Coding Help
Yes, when it comes from an HTML page. That is any time you are inserting user provided data. -
Getting the error Undefined index but the column exists
gw1500se replied to makamo66's topic in PHP Coding Help
I always have trouble using them in that context which is why I use my suggestion trouble free. -
Getting the error Undefined index but the column exists
gw1500se replied to makamo66's topic in PHP Coding Help
First please use the code icon (<>) to insert code and select PHP. It makes your code much easier to read. The main thing I notice is that you are using single quotes for your variaables when you build the query string. Single quotes tells PHP to treat the contents as literals. Had you used the code icon you probably would have seen that. mysqli_query($connection, "INSERT INTO comment_table (name, date_col) VALUES (".$name.", ".$date_col.")"); That being said never, ever use the above code. You leave it wide open to injection attack. Any time you want to insert HTML variables into a query you MUST use prepared statements. -
Not for DNS assigned IPs. Static IPs are only a maybe. There is no way to capture that reliably without user interaction.
-
IP address locations are based on the ISP location not the assigned user location.
-
How to block a video from being accessed via url?
gw1500se replied to Chrisj's topic in PHP Coding Help
I'll cross that off. -
How to block a video from being accessed via url?
gw1500se replied to Chrisj's topic in PHP Coding Help
It will be more than just a script. You will need to set up a database as well to store the user login information. Try reading this to start. -
email address is domain account user name @ the server name
gw1500se replied to Chrisj's topic in PHP Coding Help
I know it was a namespace statement but it had nothing to do with the original problem. It still looks like a path issue for the PHPMailer code. -
email address is domain account user name @ the server name
gw1500se replied to Chrisj's topic in PHP Coding Help
"use" ????????