Skip to content

Instantly share code, notes, and snippets.

@dennisdegryse
Last active August 29, 2015 14:20
Show Gist options
  • Save dennisdegryse/17059f8b176bc830b03c to your computer and use it in GitHub Desktop.
Save dennisdegryse/17059f8b176bc830b03c to your computer and use it in GitHub Desktop.
<?php
$cadID = $_GET['cadID']; // validate this!
$url = '/uploads/';
$dbc = mysqli_connect('localhost','***********','************','*********')
or die ('Error connecting to Database');
$statement = mysqli_prepare($dbc, "UPDATE classifieds SET img1=? WHERE cadID=?;");
$statement->bind_param("s", $url . $ret); // $ret is not found in the given scope
$statement->bind_param("s", $cadID);
$result = statement->execute() or die('MySQL Error: ' . mysqli_error($dbc));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment