nPhoenix

Wix - Invite :)

Feb 9th, 2012
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?
  2. include "lib/config.php";
  3. include "lib/sql.php";
  4. $invite = rand(0,10000);
  5. $checkInvite = mysql_query("SELECT * FROM ".$tabela3." WHERE invite='".$invite."'") or die(mysql_error());
  6. if (mysql_num_rows($checkInvite) > 0) {
  7. die('Convite jรก existente');
  8. } else {
  9. $criar=mysql_query("INSERT INTO ".$tabela3."(invite) VALUES('".$invite."')") or die(mysql_error());
  10. if ($criar) {echo "Convite criado com sucesso!";}
  11. };
Advertisement
Add Comment
Please, Sign In to add comment