Skip to content

Instantly share code, notes, and snippets.

@Ambalus
Last active May 20, 2018 14:03
Show Gist options
  • Select an option

  • Save Ambalus/8fd51a17380e9ded945b4bc54e6a7b22 to your computer and use it in GitHub Desktop.

Select an option

Save Ambalus/8fd51a17380e9ded945b4bc54e6a7b22 to your computer and use it in GitHub Desktop.
<?php
$id_user = 'some';
$res = $db->query("SELECT id FROM users WHERE id=?", $id_user);
if($res['id']){
$db->query("INSERT INTO stickies(id,top,tLeft,text,id_user) VALUES('some','some','some','some',$id_user)");
}else{
exit("user #$id_user not found!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment