Jump to content

help with newsletter form


poleman

Recommended Posts

Hi, i had this form working a while ago and now its not...

 

here is the html form:

<form name="Menu1"><font size="2" color="#003366"><b><span style="font-family: tahoma">Keep 
updated on all events in the JSay 
Newsletter. sign Up today! <br>
We promise not to spam you!</span></b></font></font></div>
      <form method="POST" action="newsletter.php">
          <blockquote>
            <blockquote>
              <blockquote>
                <blockquote>
                  <blockquote>
                    <p align="left"> <class="style8" font-family: tahoma;"><font color="#003366"><span style="font-family: tahoma; font-size: 13px">Name:</span></font><input type="text" name="name" size="12"><font color="#003366"><span style="font-family: tahoma; font-size: 13px">
                    <br>
                    Email: <input type="text" name="email" size="20"><br>
            <button name="B1" type="submit">Subscribe</button></span></font></p>
                  </blockquote>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
          </p>
          </form>

 

 

php code is:

 

<?php
  error_reporting(E_ALL) ; ini_set('display_errors',1);
  $con = mysql_connect("db778.oneandone.co.uk","dbo191523061","zcMcsqnB");
  if (!$con) {
    die('Could not connect: ' . mysql_error());
  }
  mysql_select_db("db191523061", $con);
  $sql="INSERT INTO Newsletter(name, email) VALUES ('{$_POST['name']}','{$_POST['email']}')";
  if (!mysql_query($sql,$con)) {
    die('Error: ' . mysql_error().$sql);
  }
  mysql_close($con);
  header("Location: newsletter_thankyou.html");
?>

 

 

Hope you can help!! Thanks!! ???

Link to comment
https://forums.phpfreaks.com/topic/60265-help-with-newsletter-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.