Beginning PHP: One Goal at a Time

12/10/2009

A couple of months ago, I knew almost nothing about PHP, only that is was a programming language that I needed to learn. Today, my whole site relies upon PHP and I have gained the confidence that almost anything is possible using PHP. I accomplished this achievement using methods that I will describe in this article.

Set Small Goals That You Can Achieve

One of the most destructive things a programmer can do is to try to develop an extensive program or complicated website all at once. When I started to create my new site, I began with a simple goal--to make a members' area that users could log into and out from. I didn't decide what features the members area would have, I just wanted to successfully code the restricted area. I made a very simple form of registration--a database for users and the PHP functions that were required to transfer the data to the MySQL database. It was not a 'mission impossible' goal, but it was something that I knew I could accomplish and then I could move on to the next goal.

At this point I decide how to ensure that it is entered by the user in the form of data. Keep in mind that hackers may try to confuse or misuse of automatic registration database filled with junk e-mail me, I decided to do a simple security key to use the image. Users need to enter the text from the image in order to prevent spam / robot registration.

My next task was to decide how people can login and logout and how to validate the form to make sure someone did not enter garbage data in the email field. Then I needed to figure out how to send an email when the user finished the registration process. This was needed in order to make sure that the user entered a valid email.

After I worked out the features mentioned above, I started to think about my next task. I decided to allow members to post their own tutorials on the site and store them in the MySQL database. I wanted to be able to:

- rate these tutorials
- create a profile for each user
- allow users to comment on several pages
- allow users to search through these areas
- integrate the JavaScript with the PHP code

Using PHP with JavaScript code, and dynamic content, I do, JavaScript in the pull-down menu is provided to allow me to insert the title of the new tutorial. I generally like AJAX I need to be reloaded if the user's rating page for my assessment that no

The Internet Is a PHP Developer's Friend

Even if you do not have any PHP manuals or books, if you read this article, you are very lucky! Internet search engines, forums and PHP is located in www.php.net manual can be your best tool. First of all, I have the syntax of any PHP function, or implementation of methods, appears to be in the PHP manual above website. Then, I try to own PHP code, if I have not found what I needed, or I face a problem, I use a search engine or forums to find answers to my questions.

Keep in mind that by searching the discussion forums, I have also found some very complicated solutions to problems that I was able to solve in a much simpler manner. Nevertheless, the forum posts can provide you with an idea of what is going on with your code, or what you need to do to accomplish your goal.

On the problems faced, I think that one spent a lot of time, when I for my site security. An example is the mysterious PHP to run twice, so this is as a user's image display, from the actual key sent to the PHP form processing page a different key. This problem only occurs in the Mozilla browser. I do not know the first two runs PHP is that I do not doubt this is related to the browser, I found online and found that from the guys said something similar problems in the forum post. They explained that, Mozilla's request, HTML and images to use a separate request. Using this information, I can come up with effective solutions package.

Everything You Want, You Must Code

When you do not want to use other developer's code, you can certainly learn from their work. If you use other programmer jobs depend only re-learn your tricks, you can say so. For example, if I, as a mechanism to create my tutorial submission tool, open source forum, I would have ended, and did not know how stored in the form of the textarea's caret.

Hack Your Own Site

Security issues are very important for any developer, even for the most rudamentary applications. For instance, you do not want to wake up one morning to find your site's guestbook full of junk and porn advertisements.

If any one application may not work correctly, your site was flawed. The best thing about PHP is one, it is a server-side language, which means that users will not see the code directly - things behind the scenes. On the contrary, if you write bad code, you may be inevitable that allow users to really mess things your site has. For example, you will not want to allow the transfer of variables through form input directly to your database. You should use htmlspecialchars to prevent malicious code to let others add to the database.

Interactive Site?

These days, the topic, the website adopt a flexible attitude, with their guests. The best way to create some interaction is mixed JavaScript and PHP, so that these "teammates" to work together. The most promising new technologies is one of AJAX, which it. I recently started using my website on the AJAX. This is a simple, fast, saves you from waiting for user page refresh just post a comment again, for me, (or the rate of tutorial). Because PHP is a server-side language, you only need to reload the page to pass variable. Ajax using XMLHttpRequest or other means of JavaScript, but you can achieve in the background server and without having to reload any results returned to the user.

Conclusion

Although I am still learning PHP, by using the techniques I mentioned above, I was able to create my own interactive website. I continue to add to my site, and my knowledge of PHP increases with each new feature I add. I encourage you to begin your own journey into PHP programming--you won't be sorry.

Posted in: javascript tutorial| Tags: Database time couple image site form php area goal registration

Be Prepared For Any Interview Question

11/03/2009

Things can go really against you despite your thorough preparation for a just a couple of ‘types' of interview questions. However, it is possible to ignore or forget the other types of possible interview questions. This brings us to different ‘types' of interview questions, along with traditional questions or questions pertaining to your core skills.

Types Of Interview Questions

If you are able to predict the types of questions may go up to the interview is important. Let's try to categorize them into three types:

1. ‘Out of the box' questions and hardcore questions are the traditionally asked ones that cannot be readily anticipated. They may or may not be related to the job at hand, and are designed to see how well you can ‘think on your feet'.

2. Questions That Test Behavior And Problem Solving Abilities. These aim to find how you have conducted yourself in difficult situations and how will you do if the situation were to repeat itself. Interviewers always want to test you for unexpected and accidental circumstances.

3. Lastly, There Are Illegal Questions which are sometimes cleverly framed. These are aimed to find out your nationality, religious or ethnic background, marital status, etc. Illegal questions are not always intentional, but sometimes they are. The world isn't fair, and you may as well know this going in.

Sample Questions

Let's look at some samples from two categories:

Traditional Questions/Behavioral Questions

1. Tell us about yourself. In my humble opinion, the most overused and overworked, and unfortunately the most likely first question in any interview. This question can be manifested in any form. As there is no right or wrong answer to this, this is an open-ended question, most often used by inexperienced interviewers. However, if this question does come up (and you should assume that it will), then stick to answering strictly in business terms; NEVER volunteer personal information.

2. Why do you want to join us? This is another question belonging to the same category as the earlier one but usually follows it. As such, it is routinely predictable and you should have your answer ready. You need to list the benefits of your joining them from both points of view (the employer's first, then yours).

3. How would you describe yourself? Adopt a realistic approach towards this question and use adjectives like ‘honest', ‘hard working', etc., instead of the overused/ambiguous answers like ‘courageous' or ‘results-oriented'.

4. ‘Describe a situation which demanded working overtime' (or any variations on this question). If you have been in the corporate world for any length of time, you should have encountered this scenario. This question is devised only to see how you will possibly conduct yourself, as the new employer is probably anticipating similar situations happening should you be hired.

5. ‘Tell me about a decision that you made which was a bad one'. This may well be a hypothetical question. But if you had had made a bad decision, a ‘positive you' will explain this in a structured mixture of truth, admission, failure analysis and so on. In other words, logically turn a potential negative answer into a positive one - avoid making yourself look incompetent at all costs.

Let's take a look at some possible illegal questions. Employers know that they do not believe, ask them, but (a lot anyway, and some in different variations, in order not) to overtly illegal:

Illegal Questions

Six. Their religion, or prevent you from working weekends? (Overtly illegal question)

7. Do you plan to have children? (your marital status, or perhaps to reveal your sexual orientation), designed

8. When / Where were you born? (A search for your age or race smart way)

9. Your last name sounds unusual, do you come from? (Designed to show your ethnic background)

As a job seeker, you will invariable come across all types of interview questions. There are as many different types of questions as there are interviewers. It pays to be aware of the many types of questions that you will encounter - doing so will ensure that you handle such questions with confidence.

Posted in: interview questions| Tags: Interview Question preparation core couple types

Hot Posts

Latest posts

Tags

Others

Sponsors

asp.net interview questions