Jump to content

Bigg Brawler

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Bigg Brawler's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. seeing how it wasn't a blatant "this is wrong" I researched the actual $pk = $_POST['pk'] and found even though I thought the variable was being posted.... it wasn't. The code is correct and want to thank you guys for helping me figure out it wasn't the php code but the code being posted TO php.
  2. $link is in my 'db_connect.php' include... it's the connection to my database. $link = mysqli_connect('hostname', 'username', 'password', 'database');
  3. Hi All, I have a simple 'delete record' code that is not working. Would someone please take a gander at it and let me know if they see anything wrong that would prevent it from actually deleting a record. <?php //connects to the database include ('db_connect.php'); //post variable $pk = $_POST['pk']; //MySQL code to query ---- 'contacts' = table & 'primary_key' = record id # $deleteContact = "DELETE FROM `contacts` WHERE `primary_key` = ".$pk." LIMIT 1"; //excutes query to MySQL $res = mysqli_query($link,$deleteContact); //close connection to database mysqli_close($link); ?> Any help would be great. Thank you.
×
×
  • 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.