Why does this not work?

techlists at phpcoderusa.com techlists at phpcoderusa.com
Mon Dec 30 07:26:47 MST 2019


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=joe at actionline.com>
<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 = "joe at actionline.com";
>  $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 - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss


More information about the PLUG-discuss mailing list