Re: Why does this not work?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: PLUG-discuss
Date:  
To: joe, Main PLUG discussion list
Subject: Re: Why does this not work?
Hi Joe,

Went to http://www.upquick.com/message/ to test the form. When I submit
the form it takes me to https://www.bluehost.com/bluemail which returns
a 404 error.

Your form :

<form action=https://www.bluehost.com/bluemail
enctype=multipart/form-data method=POST>
<textarea type=text placeholder="Please enter your message,
question, suggestion, or comment here ..."
name=comments cols=45 rows=7 wrap=virtual></textarea><br>
<input type=text placeholder="Your email address"
size=30 maxlength=90 name=mailfrom>
<input type=submit value=Send>
<input type=hidden name=sendtoemail value=>
<input type=hidden name=redirect value=http://www.upquick.com>
</form>

---

Notice the very first line that has the action directive :
action=https://www.bluehost.com/bluemail

That is the first thing to resolve.

Note your form does nothing to sanitize the data which needs to be
addressed also.

---
Keith


On 2019-12-29 17:16, Joe Lowder wrote:
> For years, I have used bluemail form input for a simple
> way to invite comments from visitors to my websites;
> but recently discovered that this quit working:
>
> http://www.upquick.com/message/
>
> So, I asked bluehost support for a remedy and they
> sent the code sample shown below, which I uploaded
> to a test site: upquick.com/message/forminput4.htm
> to try to use, but it does not work.
>
> What do I need to change to get this to work?:
>
> <!-- forminput4.htm 1912-29 -->
>
> <?php
> //if "email" variable is filled out, send email
> if (isset($_REQUEST['email'])) {
>
> //Email information
> $admin_email = "";
> $email = $_REQUEST['email'];
> $subject = $_REQUEST['subject'];
> $comment = $_REQUEST['comment'];
>
> //send email
> mail($admin_email, "$subject", $comment, "From:" . $email);
>
> //Email response
> echo "Thank you for contacting us!";
> }
>
> //if "email" variable is not filled out, display the form
> else {
> ?>
>
> <form method="post">
> Email: <input name="email" type="text" /><br>
> Subject: <input name="subject" type="text" /><br>
> Message:<br>
> <textarea name="comment" rows="10" cols="40"></textarea><br>
> <input type="submit" value="Submit" /><br>
> </form>
> <?php
> }
> ?>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss