Jump to content

James986

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

James986's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for that! it worked  :) I changed the database like you suggested.
  2. Neither of them worked, CommentID is a primary key set to auto-incriment so i tried both queries with and without LAST_INSERT_ID(). But nothing worked  >:( Is there anything I missed out? If there an execute function you need to use once the query is specified?
  3. Hello, I have been programming in PHP probably no more than a weak. I am having trouble trying to add a record to a mySQL database. The code I use is below. [code] $blnSecurityCodeIsGood=""; $blnSecurityCodeIsGood=false; if( isset($_POST['txtCAPTCHA']) && $_POST['txtCAPTCHA'] != $_SESSION['strCAPTCHACode'] ) { $blnSecurityCodeIsGood=false; } else { $blnSecurityCodeIsGood=true;   $sql = "INSERT INTO 'tblBlogComments' ('CommentID', 'BlogID', 'UserID', 'Active', 'Username', 'Comment') VALUES (NULL, '1', '1', '1', 'James', 'test');"; //  if(!$sql) {   echo mysql_error($dbQuery); //  };   mysql_query($sql,$dbQuery);   echo $sql."<br>Ok."; } [/code] As you can see i have tried to get it to display and SQL error message but no errors are displayed, but when i check the database through phpMyAdmin no modification have been made in any way, shape or form. Any help is wanted! Thanks in Advance. Regards, James
  4. Hello, I am extremely new to php so any help you can provide is extremely useful for me. I have a string which has been taken from a database. This string is a date. E.g: 22/11/2006 But I want to format it so it appears similar to this: Wednesday, 22 November 2006 Can this be done? Thanks In Advance, James
×
×
  • 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.