This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Thursday, 4 July 2013

An Extensive Examination of the PHP:DataGrid Component: Part 1


An Extensive Examination of the PHP:DataGrid Component: Part 1

Introduction

One of the most common tasks in PHP is retrieving data from a database table, and creating a HTML table to output that data. It's done in almost every project, and it's usually a really boring task, because the code is always nearly the same, but not just same enough to be able to copy it.

It often looks some like this (in pseudo-code):

Create database connection
Get data from a table
Output table header (<table)
Loop through each records
... output tr's and td's ...
Output table footer (</table>)

It's a sad fact, but we've already written code like the above hundreds of times. And for every project and script, you have to do it again, again and again.

But why not use a solution that can do it for us? That's exactly what PHP:DataGrid is.

What is PHP:DataGrid?

PHP:DataGrid (http://phpscripts.pallettgroup.com/phpdatagrid/?ref=phpit) is the answer to the above problem. It's basically a PHP component, that's very similar to the ASP.NET DataGrid control. PHP:DataGrid will take care of all the boring tasks leaving you the easy and interesting parts. Very little PHP code is actually necessary for PHP:DataGrid, and you can change its looks and layout using simple HTML tags.

The only downside of PHP:DataGrid is that it's not free. You have to purchase it from TPG PHP Scripts (http://phpscripts.pallettgroup.com/?ref=phpscripts), but it's $24.99 for a Developer license, which grants you permission to use it in all your personal projects, and I certainly believe that the advantages far outweigh the cost. Even only the time saved by PHP:DataGrid is already worth the cost for me. (editor's note: use coupon code phpit for a 10% discount!).

Let's have an actual look at PHP:DataGrid. If you don't want to purchase the component yourself, then you can always have a look at the demo's only.

The Basics

To create a new datagrid, we must use the php:datagrid tag. This tells the PHP:DataGrid component that a datagrid must be shown. The only thing that we must set is the name of the datagrid. This is a required attribute, and cannot be left out. A simple datagrid looks like this:
  <php:datagrid name="test"></php:datagrid>  


That's the only thing necessary to display a datagrid. But we're forgetting one thing - we haven't binded any data to the datagrid yet. If you forget to do this, nothing will be displayed, except for an error.

Binding Data

Binding data to a datagrid is really easy, and requires only one line of real PHP code. The PHP:DataGrid component automatically creates a variables called $_DATAGRID (not a superglobal (http://www.php.net/variables.predefined), unfortunately). To bind data, you have to call the bind() method on the $_DATAGRID variable, like so:
$_DATAGRID->bind('test', $data);


That's all! The test datagrid will now be shown, with the data contained in the $data variable. The $data variable must be an array that was retrieved using mysql_fetch_array() and a loop (see the datagrid example below if you're unsure about this) or similar format. In any case, it should look like this:
  Array  (      [0] => Array          (              [id] => 1              [title] => Item 1              [category] => 4          )        [1] => Array          (              [id] => 2              [title] => Item 2              [category] => 7          )        [2] => Array          (              [id] => 3              [title] => Item 3              [category] => 3          )  )  


The above is a valid $data array. It won't accept any other format, and an error will be shown if you do bind a different format.

An Example

The below code is a working example of a simple datagrid. It retrieves the 10 latest tutorials from the PHPit.net database, and shows it in a datagrid.
  <?php    // Include PHP:DataGrid  include ('/path/to/phpdatagrid.php');    // Connect to database  $link = mysql_connect ('localhost', 'sa', '[db-pass]');    // Select database  mysql_select_db('phpit', $link);    // Do query and Get data  $result = mysql_query ("SELECT title, description, author, datetimestamp, filename FROM tutorial ORDER BY datetimestamp DESC LIMIT 0, 10");  $data = array();  while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {   array_push ($data, $row);  }    // Bind data (THIS IS IMPORTANT)  $_DATAGRID->bind ('test', $data);    ?>  <html>   <head>    <title>PHP:DataGrid Demo 1</title>   </head>     <body>    <h1>PHP:DataGrid Demo 1</h1>    <p>Demonstrating a simple PHP:DataGrid, and nothing more.</p>       <php:datagrid name="test"></php:datagrid>      <br />    <a href="http://www.phpit.net/article/datagrid-1/"><strong>&laquo; Return to the article</strong></a>   </body>  </html>[ View live demo (http://www.phpit.net/demo/datagrid%20examination/datagrid1.php) ]  


As you can see little code is used for the datagrid. Most of the code is actually spent on connecting to the MySQL database, and getting the data. If you use any kind of database class, this will be significantly easier.

If you have a look at the datagrid, you will notice that it looks ugly, and pretty bad. That's because we haven't added any styling at all. But that will have to wait until Part 2 of our DataGrid series.

Summary

In this part of our DataGrid series, we've looked at the basics of the PHP:DataGrid component: what it is, and how to put it on our website. But it doesn't look pretty yet, and in the next parts we'll be looking at creating a pretty datagrid, and talk about more of its functions (e.g. templates, inline editing, sorting and more!).

Click here to view the PHP:DataGrid Product Page (http://phpscripts.pallettgroup.com/phpdatagrid/?ref=phpit)

Don't forget - use coupon code phpit for a 10% discount!
You can find additional info at the following links:
Click Here for more information
Click Here for more information
























Tuesday, 2 July 2013

How Does a Bread Machine Work?



There are tons of reasons why a lot of people prefer freshly baked home made bread over bread bought at the store. Homemade bread is healthier, costs less, tastes better and is not full of preservatives to increase shelf live. Because of these reasons there are many different types of bread machines to make baking bread at home a very simple task.

Here's how to use a bread machine to bake your bread. First you will have to add the ingredients into the machine, select the cycle you want to use such as "white bread" "whole wheat bread" etc. Then press start. The bread machine will then automatically knead your dough, let it rise and then bake it to perfection as long as you measured your ingredients correctly which is a very important step in the bread making process.

Some bread machines comes with one kneading blade while others comes with two. These paddles are used to automatically knead your dough for the correct amount of time before letting it rise within the bread machine. After the dough has rised for the correct period of time the machine will start the baking process. Once that is done you will be left with a tasty loaf of freshly baked bread. How great is that?

Mos bread machines has their own recipe book but we found that they are not very good at all. It will be better to do a google search and purchase your own. Bread machines do however come with many pre programmed settings which enables you to instantly bake many different types of bread with the push of a button. Some of the breads that are pre programmed are french bread, dinner rolls, white bread and whole wheat bread. Some machines like the Breadman Tr 875 even has a gluten free setting.




You can find additional info at the following links:
Click Here for more information
Click Here for more information

Improving Self Esteem With Affirmations And Therapeutic Relaxation Music


Positive self-esteem is very important for our general health and wellness as human beings. Having positive self-esteem is also important for promoting any type of healing, whether physical, emotional or spiritual. Poor or low self-esteem on the other hand can be quite detrimental to our well-being and even our very existence. Negative self-esteem can create anxiety, stress, loneliness, depression, problems with relationships, seriously impair academic and job performance and also can generate an increased vulnerability to drug and alcohol abuse and dependency. On the other hand, a person with positive self-esteem tends to be more motivated in taking on and creating a life that he loves, living it powerfully and in this process be authentically related to others in his community. Having positive self-esteem appears to be necessary for having a happy and healthy existence regardless of who we are or what profession we are taking on in life.

What is self-esteem? We commonly think that self-esteem is merely about how we feel about ourselves at any particular moment. While seemingly existing in degrees, we tend to believe that we have positive or negative self-esteem and that we make that determination simply by how we feel about ourselves. However, within a conversation of Transformational Counseling, our feelings or emotions do not exist alone or have an independent existence. We do not just simply feel. Rather, for every feeling or emotion that we have, either positive or negative, there is a corresponding thought that we have about ourselves that generates the experience of self-esteem. Whether positive or negative, self-esteem is merely how our organism experiences the thoughts that the individual has about himself or herself. If a person has positive thoughts about himself he will experience positive or good self-esteem. On the other hand, if the individual has negative thoughts about who he thinks he is then he will experience poor or negative self-esteem. Therefore, to truly understand what self-esteem is all about and more importantly to be able to alter it when necessary for ones wellness or healing, we must first get it that self-esteem is really about our thinking, and more specifically about the thoughts that we develop or create about ourselves. The thoughts or beliefs that we have about ourselves are crucial in that they determine or create the structure of our experience of self-esteem and the various emotions associated with it.

We also tend to think of our self-esteem as being something that is shaped by the events that take place in our life, particularly those from our past. We tend to believe that who we think we are and how we feel about ourselves is merely the product, effect or caused by the experiences that we have had in the past, that we are who we are by virtue of what has happened to us as human beings. More specifically, we tend to think that the cause in the matter of who we think we are and our self-esteem is due to circumstance, situation or others, people, places and things. We do not tend to think that our self-esteem is something we actually developed or created. Within the work of transformation, it is not the past, circumstance, situation or others, that determines our underlying self-image and corresponding self-esteem. We created our thoughts and with it our emotions from the meaning that we gave to the events that took place in our life, especially at an early age. As meaning making machines we give meaning to everything in our life including and most importantly to ourselves. At an early age the meaning that we give an event tends to be made out to be all about us. While events do happen it is not the events that are important but rather the meaning that we give them and especially how we made it out to be about our identity.

Given the fact that our thoughts determine our feelings or emotions and equally important that we are truly responsible for their creation, to change or transform our self-esteem, how we tend to feel about ourselves, amounts to us altering how we see or conceive of ourselves in the world in the now and this work is our responsibility alone. It is our self-image, how we define ourselves as an individual in the world in the present, that determines our experience of self-esteem and it is this that we are truly responsible for creating and equally responsible for transforming. When we alter or transform our definition of ourselves in the present we change how we feel about ourselves and with it our experience of reality and life in general. If we do not get it that we are responsible for what we think about ourselves and that we are the real author of our self-image and self-esteem we will continue to blame something or some body, remain powerless and stuck in life. The question of how to actually go about altering or improving an individual’s self-esteem is one that has been debated for many years by professionals both in the mental health and addiction arenas.

Self-esteem can be improved or transformed in several ways. One way to improve ones self-esteem is to do the work of transformation as outlined in my articles, Transformational Counseling and The Conversation of Transformation. To improve ones self-esteem in this manner is to become present to ones self limiting belief, that which has stopped us in life and in the process create new possibilities for oneself, a new self-image from which to begin to live life into. Another way to improve an individual’s self-esteem is through the use of positive affirmations. Given that the basis of self-esteem is the thoughts that a person has about himself, an individual with poor or negative self-esteem is believing negative thoughts or ideas about who he thinks he is. The individual may think, for example, that he is “worthless” or “not good enough” and as a result will tend to experience poor or negative self-esteem. Within the work of transformation and Transformational Counseling, the thought that is at the basis or core of our self-talk is defined as a person’s Self Limiting Belief, the fundamental or core belief about who we think we are. Unless this core thought or belief that a person has about himself is changed or transformed he will continue to experience a poor or negative self-esteem and as a result of this negative thought pattern create or generate life experiences that will match and validate what they think about themselves. Given such a cognitive and emotional situation life will continue to appear as it has in the past and ones future will merely be the probable almost certain future.

Utilizing positive affirmations can be a very powerful tool for transforming what a person thinks about himself and as a result improve the individual’s self-esteem. Consistent use of positive affirmations will transform the negative beliefs about who a person thinks he is into positive ones, will begin to alter the basis and structure of his self talk or inner voice and produce a transformation from poor self-esteem to positive self-esteem. While utilized in a various ways, working with positive affirmations will be more effective when delivered through or combined with therapeutic relaxation music. What therapeutic relaxation music does to enhance the effect of positive affirmations is to create a very relaxed audio environment for the individual to become even more open or suggestive to the language of positive affirmations. When therapeutic relaxation music is combined with binaural audio tones the audio space that is created for the delivery of positive affirmations is even more relaxing and as a result very powerful. In addition to utilizing a unique type of therapeutic relaxation music, the infusion of either theta or alpha binaural tones is crucial for the success of this type of intervention. When therapeutic relaxation music and binaural audio tones are combined in this fashion the individual will experience a very deep state of relaxation and as a result be more open to the reception and eventual acceptance of the positive affirmations.

The key to the effective use of positive affirmation in this or any other type of intervention is consistency. The self-image and the negative thoughts about who a person thinks he is that generates his experience of poor or negative self-esteem is well established in the his belief system. In many cases the development of a negative self-image took years to create and has been reinforced through repetitive behavioral validation. Once a person creates and then believes that a self-limiting belief is true he will continually act as if it is true. This seemingly fundamental belief will appear to the person as true and as a result will continually be acted upon and thereby be reinforced through ones behavior. Much of that person’s behavior will be to continually validate who he thinks he is. Ones behavior will always be directed at supporting, reinforcing and validating what the person believes is true about him. While necessary for ones well-being and health, such a transformation of ones self-image from being basically a negative one to one that is fundamentally positive does not happen instantly. As with the development of an individual’s negative self-image, the development of a more adequate belief about the true nature of the individual will necessitate consistent and repetitive work by the person. Basic to this process is that the individual must fully embrace his sense of complete responsibility for the development of his self-image and also for its transformation. To do otherwise will only leave the individual feeling powerless and unable to create the life that he or she truly desires and unless there is consistency and repetition such a transformation will simply not happen.

Enhancing My Self Esteem is an audio product that will effectively transform the very structure of an individual’s thought or belief pattern, the basic ideas and language structure that he uses to define who he thinks he is in the world. This product was designed specially to change the self-talk that a person experiences on a daily basis by changing the ideas or beliefs that the person has about himself, the very foundation or backdrop of his inner conversation. As our identity is merely language, change the language in a person’s mind and his life transforms. By listening to this product an individual has the opportunity to practice or repeat fifty positive affirmations that will empower them to alter their life. Within a conversation of Transformational Counseling, committing an affirmation to spoken word makes it so or real especially if it is done repeatedly. Listening to positive affirmations before sleep also allows the person’s mind to begin this restructuring or reprogramming process even while the individual sleeps by taking the words and language into their dream state. By consistently listening to and practicing the positive affirmations in this product the individual will have the opportunity to begin to redefine themselves, who they think they are in the world, from one that is negative to one that is positive and enhancing for their life. With the acceptance of the words and language of the positive affirmations will come an improved self-image and with it an experience of positive self esteem.

I am currently using Enhancing My Self Esteem with all the clients that I counsel at the Holistic Addiction Treatment Program in North Miami Beach, Florida. All of the clients that I have worked with who are experiencing a drug and/or alcohol dependency problem also have very low self-esteem. My clients tend to be very depressed and unmotivated in many if not most of the various domains of their life, including and especially with their recovery. When given to my clients as homework, consistent use of Enhancing My Self Esteem alters how they think and improves how they feel about themselves. With an improved self-image and enhanced self-esteem my clients become more motivated in their life and especially with their recovery. If a person continues to experience low self-esteem and there is no intervention to disrupt the underlying cognitive process taking on improving their life and working the 12 Step Program will be meaningless and eventually given up completely as so many other things have been in the past. It is my belief that not altering or transforming the fundamental structure of ones self-image accounts for the great percentage of individuals who begin recovery and eventually relapse. The work that is essential to successful recovery is for the individual to be able to redefine who he thinks he is, to alter his self-image, the very foundation of his experience of self-esteem and life. Who the individual believes he is will determine what he does and how he will be in and appear to others and the world.

Harry Henshaw, Ed.D., L.M.H.C.
http://www.enhancedhealing.com
You can find additional info at the following links:
Click Here for more information
Click Here for more information








Monday, 1 July 2013

Social Phobia - How to Effectively Use Exposure Therapy to Combat Your Phobias!

Exposure therapy is a great method for phobia sufferers to deal with the anxiety related to their fear. For people experiencing this type of problem, their worries can lead to panic attacks, avoidance and other problems. Eliminating the feelings related to their phobia is a great way to deal with the dread and this can be accomplished through desensitization or exposure therapy.



This type of treatment, simply involves exposing yourself in gradual steps to that which you fear. It sounds simple, but dealing with the emotions that flood your system when encountering your object of dread is of course another story.



Break down the object or situation you fear into gradual steps. If you are afraid of driving on the highway, start by driving on local streets. Then drive near the highway. Then look at others driving on the highway. Drive on the highway with someone you trust behind the wheel.



Then you drive on the highway with that same person in the passenger seat. Go for one exit. Then drive for two exits, then three and so forth. Gradually exposing yourself to longer lengths of time on the highway. You can then work on driving the highway during busier times of day and so forth until you have mastered the experience.



There are some important things you need to keep in mind while practicing exposure therapy. First, you need to perform each step gradually and persevere until your feeling of fear become too strong. Before they get too intense, retreat from the activity you are doing and recover.



Use some calming techniques to restore your mind and body to a state of calmness. Once you are recovered, proceed again until the fear becomes too much and then retreat. It´s important to push yourself but not to push yourself too far.



It´s important to find someone you trust, that you can rely on to help you while you are mastering your fear. This person can be a family member or trusted friend. It may not be the person you´re closest too, like your spouse, but rather someone you trust and feel comfortable talking to about your problems.



While you´re challenging phobias, learn more about it. If you are afraid of flying, what is it about flying that makes you so uncomfortable? Is it the size of the plane, the color or feel of the seats, the number of people on the plane, the place where you are sitting? Learning more about the nature of your fear will help you in dealing with the panic and anxious feelings that surround it.



As you are challenging your phobias, you will feel some panic, some anxiety. It´s important that you are able to counteract these feelings with positive coping techniques. Some of the great methods to soothe an overactive mind or body are abdominal breathing, meditation, positive self talk or positive thought redirection.



A small amount of discomfort is unfortunately part of exposure therapy but if you use your coping strategies and don´t push yourself too far, too fast, you will be able to conquer your fears in a reasonable amount of time. Good Luck!



Download your free eBook "Stop Panic Attacks and Deal with Your Anxious Thoughts" here:

FREE REPORT STOP PANIC ATTACKS



- From Bertil Hjert - The author of the PanicGoodbye-program. Read more about my brand new course at the: Panic Goodbye Program

You can find additional info at the following links:
Click Here for more information
Click Here for more information

Sunday, 30 June 2013

What are Panic Attacks?


If you've been suffering from extreme anxiety that comes on suddenly and doesn't cause any real physical effects afterwards, then you'll want to be asking, "What are panic attacks and is this what I have, too?"

A panic attack (also known as an anxiety attack) is an episode where fear surges through your mind and body. You will feel a combination of mental and physical symptoms that can last anywhere from a few minutes to an hour before easing.

In severe cases, the person thinks they're having a heart attack and dying. That's because the adrenaline is coursing through your veins and causing your body to amp up its blood supply - so you feel a pounding of your heart, flushed skin, and other physical symptoms.

People who get panic attacks frequently and have them over a long period of time may have panic disorder. This is a real medical condition - it's not something you just get over or lighten up about.

Because this type of ailment interrupts your lifestyle, paralyzing you with fear, it's important to know what your treatment options are so that you can stop the dizziness, nausea, headaches, chest pain and tightness in your throat (among other symptoms).

A panic attack might strike without warning at any time - when you're home alone eating breakfast, when you're in the middle of carpool, at work in a meeting, or even while relaxing at a movie theater.

After an anxiety attack subsides, you might feel like it's taken its toll on you. That's normal. But the worst part is - wondering when this ailment will creep back into your life. It's unusual for someone to simply have one panic attack and then never have one again unless it's specific to one stressful situation that goes away.

While there's no scientific evidence of what causes a panic attack, scientists believe it's a combination of genes, mental focus and stress levels. Genetically, most panic attack sufferers are young women. But that doesn't mean older or younger women (and males) aren't afflicted, either - because they are. There might be a family history of anxiety attacks that contributes to your situation.

Unfortunately, the turmoil that a panic attack leaves in its wake can lead to more serious medical problems, such as depression and suicidal thoughts. Depression has been linked to many diseases, so it's important that once you ask the question, "What are panic attacks," you find the answer you need and a solution that helps you prevent this from getting out of hand.
You can find additional info at the following links:
Click Here for more information
Click Here for more information