Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as Perl by Nks ( 14 years ago )
my $block = "(`id`, `login`, `password`, `email`";
 my $val = "(NULL, '$login', '$password', '$email'"; 
 if ($name)   { $block .= ", `name`";  $val .= ", '$name'";}
 if ($surname) { $block .= ", `surname`"; $val .= ", '$surname'";}
 if ($lastname) { $block .= ", `lastname`"; $val .= ", '$lastname'";}
 if ($city)  { $block .= ", `city`";  $val .= ", '$city'";}
 if ($address) { $block .= ", `address`"; $val .= ", '$address'";}
 if ($hobbie) { $block .= ", `hobbie`"; $val .= ", '$hobbie'";}
 if ($about)  { $block .= ", `about`"; $val .= ", '$about'";}
 $block .= ", `regtime`)"; $val .= ", '$timer');";
 my $query .= "INSERT INTO `users` $block VALUES $val";
 my $res = DBWork::Query($query);
 return $res;

 

Revise this Paste

Your Name: Code Language: