Jump to content

theatereleven

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.theatereleven.com

Profile Information

  • Gender
    Not Telling
  • Location
    Los Angeles

theatereleven's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 947740!!!!!! You did it!!!!!!!!!! Thanks so much. To answer your question - I have no idea on the variables. "PHP newbie" means i scoured the NET shot gunning code until something worked. =) So yes....have more learning to do.
  2. I'm getting no where fast....below is the code i'm using now. It posts to the DB fine, but will not redirect. If I add the line: header("Location: thankyou.php"); anywhere PHP errors out talking about the header. =( <?php $hostname="test.net"; $username="test"; $password="test"; $dbname="ifdcustomers"; $usertable="CustomerInfo"; $EMAIL = "EMAIL"; $skillONE = "skillONE"; $con = mysql_connect("test.net","test","test"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("ifdcustomers", $con); $sql="INSERT INTO CustomerInfo (EMAIL, skillONE) VALUES ('$_POST','$_POST[skillONE]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } mysql_close($con) ?>
  3. I removed the echo statement and html. Still not redirecting....hmmm. It sends me to a blank page that says this: $hostname="address.net"; $username="username"; $password="password"; $dbname="ifdcustomers"; $usertable="CustomerInfo"; $EMAIL = "EMAIL"; $skillONE = "skillONE"; header("Location: thankyou.php");exit();
  4. thanks for the help. i'm kinda new (great at HTML from scratch but just getting into PHP) so should I lose the echo statement that says one record added? i guess i don't know what to take out of my current form and replace with that line you gave me.
  5. Hey forum! I'm a COMPLETE PHP newbie. Searched around and got the form below to work. Inserting basic data from a form into a MySQL database, and it works. The only thing that I need now is help on two things: 1) I need it to direct the user (input person) to a thankyou.php page. 2) I need to send a confirmation email to them and myself. Can anyone help me? That would rock!!!! Below is the code for my php form: <html> <body> $hostname="myhost"; $username="myusername"; $password="mypassword"; $dbname="ifdcustomers"; $usertable="CustomerInfo"; $first_name = "firstNAME"; $last_name = "lastNAME"; <?php $con = mysql_connect("myserver","myusername","mypassword"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("ifdcustomers", $con); $sql="INSERT INTO CustomerInfo (firstNAME, LastNAME) VALUES ('$_POST[first_name]','$_POST[last_name]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($con) ?> </body> </html>
×
×
  • 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.