Jump to content


New Members
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About baldwindavidrye

  • Rank
  • Birthday 02/15/1988

Profile Information

  • Gender
  • Location
  • Interests
    Web development, reading books, movies, gaming
  1. Well...you can use this to get the uploaded file's extension $ext = strtolower(pathinfo($img, PATHINFO_EXTENSION)); Source: PHP file upload script
  2. For PDO you have to use follow to open the connection <?php $servername = "localhost"; $username = "username"; $password = "password"; try { $conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Connected successfully"; } catch(PDOException $e) { echo "Connection failed: " . $e->getMessage(); } ?>
  • 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.