Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
Will mysql connection functions really disappear from PHP?
Jessica replied to Earthenware's topic in Miscellaneous
I've only ever seen ISP to mean internet service provider, as in the company you personally pay to access the web, not the company you pay to host your site, so I don't get why you're asking about ISPs, my ISP has nothing to do with what version of PHP my hosted sites run... As for your statement that: "If ISPs ever implemented a version of PHP that did not support mysql connection functions, they would be bombarded with support calls from people who operated sites using scripts that they had not themselves written and may not be able to re-write themselves." Hosting companies move to newer versions of PHP, and people always complain. Just go look at our help forum to see how many people were STILL using magic quotes a decade after they should have stopped, or who suddenly had to stop using ereg_*. It's good to upgrade. If you're using a script you can't maintain or afford to hire someone who can, your site probably SHOULD go down. For your connection problem, it definitely sounds like something you should talk to your hosting provider about. -
Drugs are bad.
-
Did you restart the web server?
-
No! Just turn off magic quotes. It's evil.
-
Getting these errors with WAMP server
Jessica replied to talk2toyin's topic in PHP Installation and Configuration
Well that would work if you either give $user a default value as well or check if IT is set before using it. -
Getting these errors with WAMP server
Jessica replied to talk2toyin's topic in PHP Installation and Configuration
You need to check if the value isset() first. -
Getting these errors with WAMP server
Jessica replied to talk2toyin's topic in PHP Installation and Configuration
Notices do not stop your script from executing. They point out problems in your code. You're trying to use variables that aren't set yet. In this case, array indices, most likely from $_POST. -
You cannot define a function twice in the same script. Post exactly what you tried, turn on error reporting, and post the output.
-
You can have the server request your location, I've done it for mobile websites. I'll have to lookup the code I used.
-
That is pretty rude. Twitter is a joke and worthless? I've gotten speedy customer service on twitter. I've bought products specifically because a company I follow sent out a coupon via twitter. I read blogs because they post their updates to twitter. Twitter effectively brings in viewers when you use it right. Not taking advantage of it because you think it's worthless is a joke. I could be biased because I met my husband via Twitter but... on the other hand you fed bleach or some shit to your cat. So...
-
Try wrapping all of the vars in {} like you did with the second half of them. I didn't realize the reply was not OP - OP, try doing it like was demonstrated
-
Don't see any problem. Which is line 111? Post from 109-112 or so.
-
Space between words in database causing error
Jessica replied to CoffeeAddict's topic in PHP Coding Help
If the database says "Blue Merle", you need to compare to "Blue Merle", not 'blue_merle'. *smh* -
Pretty hard for us to see it too. Toggle the switch in the top left of the editor to post in plaintext.
-
1. Don't put a variable in quotes for no reason. (line 1) 2. Please use code tags when you post. So now, post the input you're giving it and the output you get. The first thing to try is removing the space after your \n. You also never add the \n back at the end of the lines.
-
show if date is before and total is less than
Jessica replied to petattlebaum's topic in PHP Coding Help
No, you do ONE query. -
show if date is before and total is less than
Jessica replied to petattlebaum's topic in PHP Coding Help
All of those dates are in the future, and your string will evaluate to 0, so every one of those will be true. (You also use $cntLF1 some places which should trigger a warning. Still 0.) You need to clearly state what the problem is. What do you expect to happen? What does happen? Why don't you go ahead and USE the database so you don't have to write all that code over and over. You could do the logic in the query even and save a lot of trouble. -
show if date is before and total is less than
Jessica replied to petattlebaum's topic in PHP Coding Help
It's "and" - It doesn't matter what order you put them in. (($cntAll < 2) && ($unix_date > time())) is EXACTLY the same as (($unix_date > time() && $cntAll < 2)) except they get evaluated in a different order. If one is not true, PHP will exit without testing the other. In order for the second version to work, the first would work too. There is no way that was the problem. -
show if date is before and total is less than
Jessica replied to petattlebaum's topic in PHP Coding Help
If he wants to show all the dates but mark some as available and some as reserved, he'd have to get all of them. -
Thnx Barand, I thought so too but didn't have the energy to add a few rows to my table. *coffee break time*
-
show if date is before and total is less than
Jessica replied to petattlebaum's topic in PHP Coding Help
Did you try || - the PHP or. But it sounds like you want &&. You ONLY want it to show when both of those conditions are true. Otherwise people can sign up if it's after the date as long as it's not full, or people can sign up when it's full as long as it's before the date. You should also make your $countAll variable be a NUMBER. Not "100" but 100. As it is your script will always evaluate to false because 100 > 2. -
Dates work too.