Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
Don't store it in the web root
-
Good job on following one of the things I posted. :eyeroll:
- 8 replies
-
- help
- show current users characters
-
(and 2 more)
Tagged with:
-
A. Don't post screenshots of your code, post the actual code. B. why are you running htmlentities on that name? C. Your where and on clauses are redundant D. Switch to using user id instead of username, it'll be a lot easier.
- 8 replies
-
- help
- show current users characters
-
(and 2 more)
Tagged with:
-
You haven't given us enough information. You also need to look up how to use primary keys and foreign keys, and how to do a join.
-
PHP and MySQL Graphing options? Recommendations....
Jessica replied to mdemetri2's topic in PHP Coding Help
A completely different approach would be to use Flotr - it's a JavaScript library for graphing. It's one of the prettiest I've seen http://www.solutoire.com/experiments/flotr/examples/basic-axis.html You could very easily use PHP to generate the JS, or better yet JSON to send to Flotr. -
Need help separating big project into smaller PHP projects
Jessica replied to bcassol's topic in PHP Coding Help
True. I've never used the submodules functionality but obviously it's better to learn to do it the right way I just thought maybe using separate branches for each might work. -
Need help separating big project into smaller PHP projects
Jessica replied to bcassol's topic in PHP Coding Help
Also, branches? -
Kevin, only a university graduate would be so confident they knew everything.
-
What Am I doing wrong with my INSERT statement?
Jessica replied to androidd's topic in PHP Coding Help
No. Seriously you guys stop that. Backticks are for columns and tables. Quotes are for strings. Nothing goes around numbers and functions. End. -
What Am I doing wrong with my INSERT statement?
Jessica replied to androidd's topic in PHP Coding Help
OP: you need to echo the error you get from MySQL. It's probably having to do with trying to put a value into your primary key. Make that field auto increment and leave it out of your query. -
What Am I doing wrong with my INSERT statement?
Jessica replied to androidd's topic in PHP Coding Help
No, don't. Backticks are correct. -
Moving to the right forum.
-
$10 Op is using a framework/form processing script.
-
Sounds like you want to learn about things like design patterns. Ps: micro-optimization is a BAD thing. Not something you want to do.
-
Even if its music I would enjoy, it's probably going to clash with whatever tv show I'm playing on Hulu/Netflix.
-
In addition to. Not instead of.
-
It would help to see the actual MySQL error message. mysqli_error() + the actual string.
-
All of those variables are undefined. Are you confused about what the word undefined means? For one thing, you only need to use the ids to delete the rows, not all that other stuff. You have a weird combination of an INSERT mixed with DELETE.
-
You define a variable thusly: $var = 'value'; What's probably more important is A. which variable and B. what value you want it to have. Showing us only 1/10 of the error is kind of silly. If that's your entire code then you have some major issues. Like what do you think all of those variables should be? Edit: Furthermore, your DELETE query is way wrong.
-
You need to turn on error_reporting set to E_ALL and find out what errors are being produced.
-
So, you are expecting to get the data in your constructor. You wrote __construct($data). Yet you instantiate the class this way: $usr = new Users; So... I see your second function which is kind of silly to bother doing that. Obviously something isn't working in the process. Start debugging by printing the values at each point and see where you've lost the data.
-
So, step one is go read the PHP manual section on functions. http://us2.php.net/functions Then maybe also go read about arrays.