Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
The second argument needs to be an array. Sounds like $p['cast'] is not an array. You can do a var_dump on it to see what it does contain. Before trying to use an argument in a function that needs an array, if there's any chance it's not, I always test it first. (I usually use count() because I don't want to use it even if it is an array and has no values.)
-
The price is set to 0. The code works.
-
Then why are you using return? And where is your select element?
-
You should probably just have admin be a property of your user class, not a whole new class. But if you want it that way you can use instanceOf, or have a function isAdmin() return true in admin and false in user
-
You have all of that within a function?
-
Really need help on php form to update 3 mysql values
Jessica replied to Mikesag's topic in MySQL Help
Sounds like the variable isn't defined. -
Really need help on php form to update 3 mysql values
Jessica replied to Mikesag's topic in MySQL Help
1. Please use code tags so we can read the code better. 2. You're not checking for mysql errors. See my signature. 3. Don't use user input without sanitizing it. 4. Don't put quotes around variables in PHP, or numbers in MySQL 5. Date is a reserved word, you should pick a different name for your table or use ` around it. -
1. Make "Play" a button, not just plain text. 2. It took a while to start. 3. Needs directions. I tried to use the mouse at first.
-
selecting with a join and a where and an order by and a limit - error
Jessica replied to goldfishdancer's topic in MySQL Help
Don't you have to prepare before you can bind? -
email address from form submission to appear in "From"
Jessica replied to mark60480's topic in PHP Coding Help
You should use the reply-to parameter, not the from. If you're capturing their email in the form, you'd use it just like you did subject and name. -
Post your updated code.
-
Text dropped after whitespace using mysqli_query
Jessica replied to emmavt's topic in PHP Coding Help
what error? What code? -
What are you talking about "manually"??
-
Coloring usernames in table based off IP Address?
Jessica replied to Lukeidiot's topic in PHP Coding Help
You will not be able to integrate this code into yours without learning some basics. If you actually want someone to write it for you, post in freelance. If you want to learn, do some basic research. We are not here to write it for you for free. -
Read the manual on mysql_fetch_array
-
What was the problem?
-
Go back and do all the debugging steps again that I said the first time.
-
Coloring usernames in table based off IP Address?
Jessica replied to Lukeidiot's topic in PHP Coding Help
Do you know what an array is? -
No. In fact it's setting it to '' because you used = and not == But if something doesn't exist at all it can't be == '' You need isset() too.
-
Text dropped after whitespace using mysqli_query
Jessica replied to emmavt's topic in PHP Coding Help
Use {$_POST['field']} And then google SQL injection and sanitizing data. -
Coloring usernames in table based off IP Address?
Jessica replied to Lukeidiot's topic in PHP Coding Help
We have a freelancing forum for that. -
Coloring usernames in table based off IP Address?
Jessica replied to Lukeidiot's topic in PHP Coding Help
You're using so many functions wrong. You need to turn on error reporting and look up functions and syntax in the manual. -
Coloring usernames in table based off IP Address?
Jessica replied to Lukeidiot's topic in PHP Coding Help
In_array -
Yes. You were using $sql which was a string. Now you're using the CORRECT result object. If you don't understand why the code works you need to read about it and learn. You still need to remove all your @. That's bad practice. We told you the problem and how to fix it.