Jump to content

Stefany93

Members
  • Posts

    261
  • Joined

  • Last visited

Everything posted by Stefany93

  1. It's PHP doesn't really matter where you include it, before or after, as long as you fetch the functions you need first. @Psycho, I also use $_SERVER['REQUEST_METHOD']=='POST' l for checking form submit, due to IE 10 and below's enter-pressing-submit problem. I even wrote a function for it: // Check whether the user // has clicked the submit // button in a form. // The reason we are not simply // using if(isset($_POST(GET)['SUBMIT_BUTTON'])) // is because it would not work on IE 10 - // when the user would press enter // instead of the button. function submit_pressed($method){ $method = strtoupper($method); if ($_SERVER['REQUEST_METHOD'] == $method) { return true; } return false; }
  2. Use foreach loop + preg_match to match the beginning of each new array value and then put the results into a new array. Like this; // Original array $original = array(1234567 => array('name' => 'john' ) , 3456 => array ( 'name' => 'johnny' ), 1212 => array('name' => 'james')); // Term to search for $search = 'jo'; // New array to put the results in $filtered = array(); // Looping through the $original array // and if the $search value matches the // begining of the value string // then append the results in the $fileted array foreach ($original as $key => $value) { if(preg_match("/^$search/", $value['name'] )){ $filtered[] = $value['name']; } } // Display the new array with the filtered results. print_r($filtered);
  3. ^^ Terribly sorry for the late reply, thank you all for the help !
  4. Thank you so much! I did not know you could get penalized from Google from having duplicate content! What if an evil user copies my articles and posts them in a forum without my permission?
  5. Howdy, I am new to SEO. Could you please help me? 1. I like to post programming tutorials to both my website & various programming forums. Is that going to screw up my website's ranking in Google? 2. My editor of my history website who sometimes posts essays there also posts them in some history forums. Is that bad for SEO? 3. I made a Facebook page for my history website. It says there "Promote your page" basically you pay $5 for around 100 likes. Has anyone tried that? Does it work? Because $5 seems like little money for additional 100 likes which will increase the traffic considerably. Thank you so much for the help!
  6. @QuickOldCar, thank you so much, you are awesome!!!
  7. Thank you, but I want to work, not to study. @glassfish, it's not funny!
  8. Howdy Colleagues, I was wondering whether you know ways/websites/channels/magic owls to how to help find a job in USA as a programmer as in for relocating there while the company pays for the Visa and the travel expenses? My land-lord's son found a job as a programmer in Texas and the company was generous and kind enough to pay his travelling expenses, as well for his wife and kid. I have an account in Monster & Indeed and I send CVs very often, but no luck so far. And I want to go there to work and live, not like some people to rely on welfare, I have worked my whole life. Thank you! BR, Stefany
  9. Yup, you'd be better off using PDO as the colleague above noted. It is way safer and modern.
  10. ^^ Thank you all very much!
  11. ^^ so they would be indexed by google?
  12. Howdy colleagues, I have a history blog where I post, well, history related essays of my own. I'd like to store the articles in .md or .txt document in my GitHub profile. My question is, would these articles get indexed by Google, since I want them to be original for my blog? Thank you! Stef
  13. Man, was that a smart post! Indeed, creating websites for others (if you are good at it, of course) is the most "sure" way of making money, even if it is quite difficult, in the sense that you have to work a lot. But hey, if you start working at a fast-food chain, you will have to work your ass off as well!
  14. ^^ Thank you for the help, but it wouldn't have killed you to be more polite!
  15. Hmmmm, pretty complex task. I'd say, save the user's selected URL like "www.awesome-website.com/oliver-cromwell in the DB, then write a script to check whether the user had selected a special URL and then set an .htaccess directive to re-write the URL while in reality the page will be like "www.awesome-website.com?user_id=12" Hope it helps, try that and write here with the errors.
  16. Howdy, So I am creating a website with SQLite and this time I decided to follow the rule of putting the SQLite DB outside of the document root. However, the admin would need to admin, basically, the DB, so I have two choices: a) Put PhpLiteAdmin (The SQLite DB manager like PHPmyAdmin is for MySQL) in the document root while giving it a path to the actually DB that is outside of the document root; b) Set a subdomain to a directory outside of the document root of course and put both PhpLiteAdmin and the SQLite DB there and the admin would access it like this - db.Awesome-Website.com; Which one of those two options are safer? Thank you very much!
  17. I agree, but if the colleague wants to learn, he'd better build the admin panel himself. Because if he just installs a CMS then he could not learn anything. To the OP, I will give you a joker - you will need an admin panel with a form and a DB, one INSERT, SQL statement, UPDATE and a bunch of SELECTs
  18. WOW you really hate me, don't you sir? As a matter of fact at my company I had been given tasks to solve jQuery issues and guess what - I did them because I know perfect JS. There is absolutely no damn need to learn jQuery if you know Javascript since you will be wasting your time. jQuery was made for people who are not-so-smart to learn JavaScript and guess what? Now the majority of people who call themselves programmers can't write a line of Javascript. Do you have any idea how slow jQuery is? How much it slows down the web-page? And the "less typing" nonsense? We are PROGRAMMERS it is our JOB to type code. If we don't like that we can always wear the blue collar and be done with it. The greatest programmers that exists and those that I know personally only use JS and NEVER jQuery. I believe that is a proof enough.
  19. I agree with @requinix, unfortunately 13% of the website traffic comes from mobile devices such as tablets and phones and over 50% of the traffic coming from young people (-30) if from mobile devices, so nowadays going responsive is a must unfortunately. I read an article recently where the author said that when there were just 5 browsers to test, " We programmers lived in the golden age of web development"
  20. Welcome
  21. Since I do not use jQuery because I prefer JS, I can only give you ideas. I'd suggest you check beforehand what color the user has selected and if it is the same color as the current one, then you don't run the script that changes the color.
  22. If you are building the CSV files, then simply replace the delimeter with another character like | for example. If the CSV files are handed to you, then again replace the commas with | and that should solve your problem
  23. Or you can lock the file with .htaccess and .htpasswd and that way no one can access it
  24. ^^ The collegue is right, make the changes yourself and when you get stuck, ask us to help you with a spesific problem. Otherwise you will never learn. If of course, you wanna learn PHP. If you don't, then I'd suggest you pay someone to help you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.