You're using PDO, so you should be using query placeholders.
$sql= "INSERT INTO contractors (userid, password, name) VALUES (?, ?, ?)";
$result = $dbh->prepare($sql);
$count = $result->execute(array($userid, $pass1, $name));
echo $count."<br>";
As mentioned by others, you should be using something like MD5 or SHA1, preferably SHA1 due to MD5 being not-unreasonable to work around nowadays. You can do this before, or after. Here's how you'd do it before inserting:
$password_hash = sha1($pass1);
$sql= "INSERT INTO contractors (userid, password, name) VALUES (?, ?, ?)";
$result = $dbh->prepare($sql);
$count = $result->execute(array($userid, $password_hash, $name));
echo $count."<br>";
And here's how you'd do it during the insert:
$sql= "INSERT INTO contractors (userid, password, name) VALUES (?, SHA1(?), ?)";
$result = $dbh->prepare($sql);
$count = $result->execute(array($userid, $pass1, $name));
echo $count."<br>";
There are lots of other things to consider as well, such as salts and other tricks.