Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
Load Meta data dynamically from mysql database
Jessica replied to Skorpio's topic in PHP Coding Help
If you have a row that has your meta data. What. Identifying. Information. Is there. It's not a trick question. How do YOU the person I am talking to...know what data goes with what page? -
Load Meta data dynamically from mysql database
Jessica replied to Skorpio's topic in PHP Coding Help
Guru is not a person, it's our badge. If you can't explain how you relate the data in the database with the page how do you expect to code it? -
Load Meta data dynamically from mysql database
Jessica replied to Skorpio's topic in PHP Coding Help
How do you know what row of data you want? -
Load Meta data dynamically from mysql database
Jessica replied to Skorpio's topic in PHP Coding Help
Which at some point you might as well move the content into the DB and have a cms lol! -
Load Meta data dynamically from mysql database
Jessica replied to Skorpio's topic in PHP Coding Help
You have to tell it WHAT page you want to view the data for. -
1. You're not checking for SQL errors. See my signature. 2. Don't put variables in strings when they don't need to be. ("$host"). 3. DO put variables in strings when they DO need to be. (in your queries when you send a string, mysql needs to know it's a string) 4. Your code appears to put in 2 votes per person.
-
How does PHP store data in RAM..? Variables, output, passwords etc..?
Jessica replied to KingNeil's topic in PHP Coding Help
If you can't be bothered to do a little of your own research (ie, google it at least before demanding Christian answer you), what makes you think you're qualified to write "security software"? -
Newbie who can't get his form to echo correctly
Jessica replied to vincewentwrong's topic in PHP Coding Help
Post your new code -
Newbie who can't get his form to echo correctly
Jessica replied to vincewentwrong's topic in PHP Coding Help
OP: mail accepts specific arguments that you are not supplying. Read that and fix mail() Also single quoted strings will not have variables parsed. '$model' is the literal string of '$model'. You go through the trouble of creating $message but never use it. Edit: YAY MOBILE EDIT FINALLY. -
Newbie who can't get his form to echo correctly
Jessica replied to vincewentwrong's topic in PHP Coding Help
If you don't understand it, probably best to learn about it instead of saying its wrong. That's HEREDOC syntax. -
How does PHP store data in RAM..? Variables, output, passwords etc..?
Jessica replied to KingNeil's topic in PHP Coding Help
I never said it did. You're being rather rude and demanding. You can't even read the replies? However - you want to know what the command you run would show you with your own code - JUST DO IT FFS. -
How does PHP store data in RAM..? Variables, output, passwords etc..?
Jessica replied to KingNeil's topic in PHP Coding Help
Again: if someone is running commands on your server, them looking at the RAM is the least of your worries. -
You also need to learn about sanitizing user input.
-
How does PHP store data in RAM..? Variables, output, passwords etc..?
Jessica replied to KingNeil's topic in PHP Coding Help
Uhm, if they can run that command they could just vi file.php and read it a lot easier. -
And then they (Robert Half) will have 2 different recruiters every week call and email you for life.
-
Especially the last one. Turn on error reporting.
-
I really need to learn to use the new DateInterval stuff. Very cool.
-
$months = array(1=>'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'); $end_m = date('n', $end); $start_m = date('n', $start); if($end_m >= $start_m){ $month_range = array_slice($months, $start_m, $end_m); }else{ $month_range = array_merge(array_slice($months, $start_m), array_slice($months, 0, $end_m); } Not tested, and only supports 11 months or less range.
-
1. $header = ('Location: index.html'); This is just way wrong. header() is a function. I doubt you want to create a string with "Location: index.html' stored in it. 2. you use $body and $message. Pick one.
-
Do you see a theme yet with your posts and ours?
-
So... you send the email before you define the variables that you use to send the email.
-
1. Put a space after the ). 2. Use a column name, not a string. 3. Give it an alias: COUNT(id) AS orders_count 4. Fetch the row.
-
You didn't post any code that sends an email.
-
var_dump. And yes, you need session_start() as the first line on each page.
-
You shouldn't use . within a column name. You also can't use it as part of a string without quoting your strings. All of those array keys should be strings with quotes.