[thelist] Funky php output...I owe a tip or two...

Daniel Medley dm at lgcy.com
Wed Oct 2 16:33:01 CDT 2002

This is all good.. but I still have no idea of where to use them or how to
use them in this particular script. I'm way new to this and don't quite get
it. my script is as follows:

$form_block = "
<form method=\"post\" action=\"$_server[php_self]\">
<p>Your Name:<br />
<input type=\"text\" name=\"sender_name\" size=\"30\"</p>

<p>Your Email Address:<br />
<input type=\"text\" name=\"sender_email\" size=\"30\"</p>

<p>Message:<br />
<textarea name=\"message\" cols=\"30\" rows=\"10\">
<input type=\"hidden\" name=\"op\" value=\"ds\">

<p><input type=\"submit\" value=\"submit\" value=\"Send\"></p>

if ($_POST[op] != "ds") {
echo "$form_block";
} else if ($_POST[op] == "ds") {
if ($_POST[sender_name] == "") {
$name_err = "<p>Stop being a bonehead and enter your name.</p><br />";
$send = "no";
if ($_POST[sender_email] == "") {
$email_err = "<p>I'm slapping my head. Enter your e-mail address.</p><br
$send = "no";}
if ($_POST[message]== "") {
$message_err = "<p>Enter your message.</p><br />";
$send = "no";
if ($send != "no") {
$msg ="E-MAIL SENT FROM lobowalk.com \n";
        $msg .="Sender's Name:$_POST[sender_name]\n";
        $msg .="Sender's E-Mail:$_POST[sender_email]\n";
        $msg .="Message:$_POST[message]\n \n";

$to = "email adress here";
$subject = "Feedback from lobowalk";
$mailheaders .= "From: <> \n";
$mailheaders .= "Reply-to: $POST[sender_email]\n\n";
//send the mail
//display confirmation to user
echo "<p>Your message is on it's way.</p>";
} else if ($send == "no") {
//print error messages
echo "$name_err";
echo "$email_err";
echo "$message_err";
echo "$form_block";

Thanks, done feeding the baby,
----- Original Message -----
From: "Paul Bennett" <paul at teltest.com>
To: <thelist at lists.evolt.org>
Sent: Wednesday, October 02, 2002 1:50 PM
Subject: Re: [thelist] Funky php output...I owe a tip or two...

> stripslashes($email_contents);
> will take all  those nasty slashes out :)
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !

More information about the thelist mailing list