Jump to content

terencevs

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

terencevs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is my current setup. I am still getting the "Your request was not successful." and nothing goes to the database. What must I still do to get this working? Attached please find screenshot of my table setup. (Screenshot from PHPMyAdmin) THANKS! <? $host = "myserver"; $user = "myuser"; $pass = "mypassword"; $dbName = "mydatabase"; $FullName = mysql_escape_string($_POST['FullName']); $SMSNumber = mysql_escape_string($_POST['SMSNumber']); $conn = mysql_connect ($host, $user, $pass); mysql_select_db ($dbName); $query = "INSERT INTO sms_whenup ('FullName', 'SMSNumber') VALUES ('$FullName', '$SMSNumber')"; $rs = mysql_query ($query); if ($rs)     print "Your request was successful."; //or the popup window else     print "Your request was not successful."; ?> UPDATE: This is the content of my smscontact.php <form action="smscontactp.php" method="POST"> Full Name: <input type="text" name="FullName"><br> Mobile Number: <input type="text" name="SMSNumber" value="04"><br> <input type="submit" value="Add to Database"> </form> [attachment deleted by admin]
  2. Thanks guys you have just made my day! Much appreciated!
  3. [quote author=dymon link=topic=112406.msg456168#msg456168 date=1161592228] Hi, [code] <? $FullName = mysql_escape_string($_POST['FullName']); $SMSNumber = mysql_escape_string($_POST['SMSNumber']); $conn = mysql_connect ($host, $user, $pass); mysql_select_db ($dbName); $query = "INSERT INTO sms_whenup ('FullName', 'SMSNumber') VALUES ('$FullName', '$SMSNumber')"; $rs = mysql_query ($query); if ($rs)     print "Your request was successful."; //or the popup window else     print "Your request was not successful."; ?> [/code] [/quote] THANKS SO MUCH! One last question. Do I create a form now and name the two text fields $FullName and $SMSNumber. How do I setup the form? Thanks!
  4. I have a database named: mictsadb username: mictsa password: password On this database I have a table named sms_whenup The table has 3 fields: ID FullName SMSNumber I want someone to be able to fill in their full name and mobile number in a form and when they click in submit it adds it to the database. Once successfully added I would like a popup that’s says "Your request was successful." I will pickup the data from my SMS software. Any help will be gladly appreciated! Thanks!
×
×
  • 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.