Archive for October, 2008

Follow your own heart- follow your own truth

Tuesday, October 28th, 2008

Last night after publishing my article about Jesus’s sacred teachings of Love I starting to experience people having reactions to my site. I heard one person say, “It’s a Scam!”- which is quite funny. Other people think I am playing a practical joke, or involved in some kind or marketing scam. It is not a joke and I only ever follow my heart, and the truth that is within me- some may call it the Holy Spirit. I would only ever promote things I consider important, loving and true. My website comes from my heart with God’s blessings and divine guidance.

When your belief system becomes challenged, it can be difficult sometimes. But we are all prisoners to our cultural programming and beliefs.

The only true judge of anything- what is best for you- is your own heart. It is always a good idea to follow your heart as it always leads in the direction of your soul. Your heart is your best intuition for determining what is right and what is wrong, where to go, and how to discriminate between what is true and what is false.

The truth is always hidden in your heart, and your soul is the truth. Pray to God.

I wish you all the love, fun, happiness and above all- freedom.

Soon it will be Christmas time, a very auspicious time for getting in touch with Love and making Love your only goal in life. May Love set you free.

Lots of Love,

James

Free PHP Website Feedback Form- Sends Feedback by Email

Sunday, October 12th, 2008

I have been writing and developing my very first ever PHP script- a feedback form for my website.

This uses a basic HTML form to gather some feedback information from your visitors. It then posts this information to a PHP file, which returns a confirmation page. It also gets your web server to email you the feedback.

Although it is so simple, it took me a long time. But in the end I have a professional looking script, which you are welcome to use for free and modify to your particular needs and website.

I used an open source captcha image script I found on Google with my feedback form to stop the possibility of robots visiting my site that fill out forms and send spam.

So here is the script for form.php:
<?php
session_start();
if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {
// Insert you code for processing the form here, e.g emailing the submission, entering it into a database.
$output = ‘<html>
<head>
<title>Feedback Form- Confirmed</title>
<link rel=”stylesheet” href=”../css/feedback.css” type=”text/css”>
</head>
<h1>Dear ‘.$_POST["FirstName"].’, thank you for your feedback!</h1>

You entered the following details:
<ul>
<li>Your name is ‘.$_POST["FirstName"].’ ‘.$_POST["LastName"].’</li>
<li>You are ‘.$_POST["Age"].’ years old and ‘.$_POST["sex"].’</li>
<li>You are from ‘.$_POST["Country"].’</li>
<⁄ul>
<p>You rate this site: </p> <p class=”gold”>’.$_POST["Value"].’</p>
<p>Your reason for this: </p> <p class=”green”>’.$_POST["comments"].’</p></p>
<p>And this is your suggestion on how to improve the site: </p> <p class=”green”>’.$_POST["improvements"].’</p>
<br><br>
<p>Click <a href=”../index.html”>Here</a> to return back to the main page</p>.
</body>
</html>’;

$to = “example@example.com”;
$subject = “Online Feedback Form – Example.Com”;
$message = $output;
$from = $_REQUEST["EmailAddress"];
$headers = “From: $from”\r\n”;
$headers = “Content-type: text/html\r\n”;

mail($to,$subject,$message,$headers);

echo $output;

unset($_SESSION['security_code']);

} else {

// Insert your code for showing an error message here

echo “The security code you typed seems to be invalid. Please go back, reload the page and try again. The information you typed in should still be there. Thanks.”;
}

?>


This is an example of a form you can use in HTML along with the form.php file and how it matches up:

<code>
<html>
<body>
<fieldset>
<legend>

AnxietyMadeWell.Com Feedback Form:
</legend>
<form name=”input” action=”feedback.php” method=”post”>
First name:
<input type=”text” name=”FirstName” size=”20″>
Last name:
<input type=”text” name=”LastName” size=”20″>
<br><br>
Your age:
<input type=”text” name=”Age” size=”4″>
<br><br>
Your Country/Location:
<input type=”text” name=”Country” size=”20″>
<br><br>
Email address:
<input type=”text” name=”EmailAddress” size=”20″><br><br>

<input type=”radio” name=”sex” value=”Male”> Male
<br>
<input type=”radio” name=”sex” value=”Female”> Female

<br><br>

How do you rate this site?<br><br>

Excellent:
<input type=”radio” name=”Value” value=”Excellent”>

Good:
<input type=”radio” name=”value” value=”Good”>

Okay:
<input type=”radio” name=”value” value=”Okay”>

Bad:
<input type=”radio” name=”value” value=”Bad”>

Terrible:
<input type=”radio” name=”value” value=”Terrible”><br><br>

<textarea rows=”5″ cols=”30″ name=”comments”>Why?</textarea>

<br><br>

<textarea rows=”5″ cols=”30″ name=”improvements”>How could this site be improved?</textarea>

<br><br>

<img src=”CaptchaSecurityImages.php”>
Security Code:
<input id=”security_code” name=”security_code” type=”text” size=”5″>
<br><br>

<input type=”submit” value=”Submit”>

</form>
</fieldset>
</body>
</html>