Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


benanamen last won the day on January 17

benanamen had the most liked content!

Community Reputation

100 Excellent


About benanamen

  • Rank
    Master Coder

Contact Methods

  • Website URL
  • Yahoo

Profile Information

  • Gender
    Not Telling
  • Interests
    Email me at phpfreaks@galaxyinternet.us

Recent Profile Visitors

3,200 profile views
  1. benanamen

    Get specific MySQL/MariaDB error info

    I don't understand what you are looking for. What "content" do you want? Are you asking how to handle the error? If so, you can try/catch the error and respond the way you want. From the manual Source: http://php.net/manual/en/pdo.errorcode.php
  2. benanamen

    Get specific MySQL/MariaDB error info

    The error message could not be any more clear. You are attempting to insert/update/delete a column with a duplicate constraint with data that is already in the DB and incorrectly messing with data in a parent table that has child data.
  3. Could you please provide more information about this, as this is the "real" problem. You have been asking for help with your attempted solution to this. Let us decide what the solution should be. To properly do that we need to know all about the above.
  4. benanamen

    Insert Array values into mysql database

    When you when you start using incrementing numbers for your column names it is a big red flag to a design problem. Take a minute and learn about database normalization.
  5. benanamen

    Purchased Script - Help understanding file

    OP, you are incorrect. That is incorrect. It is the other way around .
  6. benanamen

    upgrade to PHP 5.5, Site Doesn't work

    That is not real code. Perhaps the manual will be of help. You will have to break it to your client that his "upgrade" is still hundreds and hundreds of releases behind. The whole bit of the code you posted shows there is quite a bit of work that will need to be done to bring the app up to date. Version 5.5 reached end of life many years ago. http://php.net/manual/en/mysqli.query.php
  7. benanamen

    Sql to loop through table

    The process can easily be automated. Allow me to introduce you to ETL, Extract, Transform, Load. There are many software's both free and paid for this purpose. https://en.wikipedia.org/wiki/Extract,_transform,_load
  8. For those of you that have not gotten the word, GitHub now offers FREE repository’s as of today.
  9. benanamen

    $row['index here'] outputs null

    Stop creating variables for nothing and use Prepared Statements. Never ever put user supplied variables in your query.
  10. benanamen

    Data is not inserted into db

    Now you tell me! It was an SUV that hit me.
  11. benanamen

    Data is not inserted into db

    Oh my. I have been really off my game lately. I got hit by a car this past November and got a concussion. It has been showing in many of my posts . Thanks @Barand.
  12. benanamen

    Data is not inserted into db

    Ok, I missed it. 😬 The !isset logic is wrong. The $_FILES['userfile'] is always going to be set on POST so that block will never run. You need to check if the userfile name is empty like so... if (empty($_FILES['userfile']['name'])) { Run this with no upload <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (empty($_FILES['userfile']['name'])) { echo 'No File Uploaded'; } if (!isset($_FILES['userfile'])) { echo 'I will never run'; } } ?> <html> <body> <form action="" method="POST" enctype="multipart/form-data"> <input type="file" name="userfile" /> <br> Username: <br> <input type="text" name="username" maxlength="26" placeholder="Username"> <input type="submit"/> </form> </body> </html>
  13. benanamen

    Data is not inserted into db

    By the way, username in the WHERE should not be quoted. I don't used named parameters but that may be the problem.
  14. benanamen

    Data is not inserted into db

    What is the result of var_dump($_FILES); Post your form as well.
  15. benanamen

    Data is not inserted into db

    What would be more helpful is an explanation of what " not working " means.

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.