Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6795311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:19:44+00:00 2026-05-26T18:19:44+00:00

I created this form: <form method=post action=process-form.php id=emailForm name=emailForm target=_self> <h4>Sign up to be

  • 0

I created this form:

<form method="post" action="process-form.php" id="emailForm" name="emailForm"      target="_self">  
    <h4>Sign up to be notified when we go live!</h4>
<label for="email">E-mail</label>
    <input type="text" name="email" id="email" />
<input type="submit" name="submit" id="submit" value="Submit"  onclick="return alert('Thanks! Your email has been added.');">

    <p>emails will not be shared with third parties</p>
</form>

With this php code

<?php

//open database connect
$username = "username";
$password = "password";
$hostname = "server"; 

$conn = mysql_connect($hostname, $username, $password);
if (!$conn) die('Could not connect: ' . mysql_error());

//emaillist is the name of the database
mysql_select_db('emaillist');

//Clean data
function clean_data($string){
  if (get_magic_quotes_gpc()){
    $string = stripslashes($string);
  }
  $string = strip_tags($string);
  return mysql_real_escape_string($string);
}

//Mail Header removal
function remove_headers($string){
  $headers = array(
        "/to\:/i",
        "/from\:/i",
        "/bcc\:/i",
        "/cc\:/i",
        "/Content\-Transfer\-Encoding\:/i",
        "/Content\-Type\:/i",
        "/Mime\-Version\:/i",
    );

    $string = preg_replace($headers, '', $string);
    return strip_tags($string);
}

//Pick up cleaned data
$email = clean_data($_POST['email']);


//Insert data
//emails is the name of the table
$query ="INSERT INTO emails (email)
  VALUES ('$email')";

mysql_query($query);

//close Connection
mysql_close($conn); 

//redirect to page
header('Location: defaultUpCyc.html');
?>

Everything was working fine and dandy in my testing environment and for a couple of days when I put it live. However, I went to my database to see if any emails were submitted and its totally empty. I have put test emails into the form and checked the db and there is nothing. I haven’t changed a thing since I put it live so I’m at a loss. Here is the test site: http://upcycledonline.com/test/Site/defaultUpCyc.html

Thanks for the help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:19:44+00:00Added an answer on May 26, 2026 at 6:19 pm

    The form tag on your test site doesn’t have its action defined which means it’s sending the data to itself and HTML can’t work with databases.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple email form: <form method=post action=process-form.php id=emailForm name=emailForm target=_self> <h4>Sign up
<form class=follow-form method=post action=listen.php> <input name=followID value=123456 type=hidden> <button type=submit value=Actions class=btn follow title=123456>
I have this method to post the value to the /store/add_to_cart <form action =
var projectWindow; function btnNew_Click() { var form = document.createElement(form); form.setAttribute(target, projectWindow); form.setAttribute(method, post); form.setAttribute(action,
I have a form and the method is set to post on the action
I have a follow-up question to this one . I created a new form,
When I create a html form like this: $form = new Zend_Form(); $form->setMethod('post'); $form2->addElement('textarea',
Using Zend_Form, how would I create form elements like this: <input type=text name=element[1] value=
I've generated the following XSLT file, and have created a Form that will post
I created a Select ELement in a form. $parentId = $this -> createElement('select', 'parent_id');

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.