Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function gVerifSQL($query)
- {
- $findme = 'DROP';
- $mystring = strtoupper($query);
- $pos = strpos($mystring, $findme);
- if ($pos === false)
- {
- $findme = 'CREATE';
- $mystring = strtoupper($query);
- $pos = strpos($mystring, $findme);
- if ($pos === false)
- {
- $findme = 'ALTER';
- $mystring = strtoupper($query);
- $pos = strpos($mystring, $findme);
- if ($pos === false)
- {
- $findme = 'INSERT';
- $mystring = strtoupper($query);
- $pos = strpos($mystring, $findme);
- if ($pos === false)
- {
- $findme = 'UPDATE';
- $mystring = strtoupper($query);
- $pos = strpos($mystring, $findme);
- if ($pos === false)
- {
- $findme = 'DELETE';
- $mystring = strtoupper($query);
- $pos = strpos($mystring, $findme);
- if ($pos === false)
- {
- echo "<b><br><br> Commande inconnue..<br></b>";
- }
- else
- {
- echo "<b><br><br> Suppression effectuée..<br></b>";
- }
- }
- else
- {
- echo "<b><br><br> Modification effectuée..<br></b>";
- }
- }
- else
- {
- echo "<b><br><br> Insertion effectuée..<br></b>";
- }
- }
- else
- {
- echo "<b><br><br> Modification effectuée..<br></b>";
- }
- }
- else
- {
- echo "<b><br><br> Table créée..<br></b>";
- }
- }
- else
- {
- echo "<b><br><br> Table supprimée..<br></b>";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement