
Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
If you have your passwords encrypted, sure there is. To compare against the encrypted version of the submitted password. Because we KNOW you're not storing passwords plain text, right?
-
I also prefer the second way, and I find it easier to match. I think it just depends on what you first saw when learning.
-
You'll probably want to use a templating system, I like Smarty, and tokens. This is a complex project, but google can help you find many tutorials.
-
What I would do in your situation is create a step by step tutorial for how he can resize his images using something free like Piknik, and give him that.
-
The immediate problem is you never run that query, you just assign it to a string value. You will need to add in a lot of error checking and data sanitation as well but that's the first problem, you never run it.
-
Ever been entering your phone number into 3 text fields, and the focus moves to the next one after 3 digits? I believe to do this you use javascript to set which element has focus. Unless you're talking about the mouse pointer, not the text cursor.
-
the project I was working on required the user to be logged in, perhaps that was why I had to use cURL. Thanks for the correction.
-
Ah I may have been incorrect on the first point then. I know cURL is the functionality you SHOULD use for this. Anyway it seems like the problem at this point is your preg_match and I fail at regex. Hope someone else can help, sorry.
-
Curl!! You need curl.
-
file_get_contents does not work that way, it's only for files on your server. try printing $content to the screen to see what you get. What you're trying to do will need a function which my mind has completely blanked on now, but I have used in the past...and it's driving me nuts that I can't recall the term for it. Hopefully someone else knows the functionality I'm thinking off... grrr.
-
ph mysql - help with do/while and incrementing index
Jessica replied to azukah's topic in PHP Coding Help
Your example will still print each image twice, as he described in the original problem. OP, can you post your new code to demonstrate the solution? -
ph mysql - help with do/while and incrementing index
Jessica replied to azukah's topic in PHP Coding Help
In the above example, I don't see $row ever defined. It is not going to be easy to do it while you're selecting the data, you want to select the data then loop through it. -
ph mysql - help with do/while and incrementing index
Jessica replied to azukah's topic in PHP Coding Help
For each result, you are outputting that result and the next one. You are also being redundant with the do/while loop, you end up selecting the data multiple times. You will want to get all of the results into an array *(you've already done that) and then loop through it (using for), that way you can increment the iterator manually. You could also use foreach but it might be trickier given what you're trying to do. -
You're welcome!
-
Yes. And it needs to be able to connect to MySQL to do so. If that page doesn't know your MySQL username and password, how would MySQL trust it?
-
*headdesk*. I feel sort of justified in my question now. good luck.
-
Are you asking me if I saved and uploaded the file? Really? No, you're imagining it. Why do YOU think if you comment out a section of code it would still execute?
-
Is that the entire code? Did you remember to save and upload it if you need to do so?
-
After $accounts = loadAccounts(); add this line: print_r($accounts); What do you get?
-
Did you mean to mark this as solved? The error is occurring because that is not a valid key for $_POST. At the top of your page try adding print_r($_POST) and seeing what that array contains.
-
There's no PHP function inside your string. You have a MySQL function COUNT, but no PHP functions.
-
Sessions will end when you close the browser, that is the nature of a session. You'll want to store the information in a database on your server.
-
Good job! functions cannot be inside of strings, otherwise they are just text. Variables ($var) can be inside of a double quoted string, but not a single quoted. Speaking of which, best practice would be to have your query in single quotes. Even better, if you know $id should be an int, use something like intval() rather than the escape string function.
-
Send Login to ne page using php header in my ajax php file.
Jessica replied to ebolt007's topic in Javascript Help
Use the SOLVED button. -
This is basic error checking. You've concatenated your string correctly in one spot, and not the other. You can't just put a function next to a string without concatenating it.