Sinsitrus
Messages postés849Date d'inscriptionsamedi 11 juin 2005StatutMembreDernière intervention21 août 2015
-
8 juil. 2011 à 22:58
Matt 261
Messages postés1173Date d'inscriptionmercredi 2 novembre 2005StatutMembreDernière intervention10 septembre 2011
-
22 juil. 2011 à 18:05
Salut !
J'ai bidulé un script php et je souhaiterai que vous me corrigez si ça ne vous derrange pas :
<?php
if (isset($_POST["Valid"])) {$Valid = $_POST["Valid"];
mysql_connect("127.0.0.1", "root", ""); mysql_select_db("Key_Computrace");
$req=mysql_query("select * from Key_Computrace where ExistKey='$Valid' and VerifKey='$Valid'"); // ExistKey = 1 | VerifKey = 1 = NO
$nb= mysql_num_rows($req); if ( $nb > 0 ) {header ('Location: KeyProduct.php'); }
$req=mysql_query("select * from Key_Computrace where ExistKey<>'$Valid'"); // ExistKey = 0 | VerifKey = 0 = NO
$nb= mysql_num_rows($req); if ( $nb > 0 ) {header ('Location: KeyProduct.php'); }
$req=mysql_query("select * from Key_Computrace where ExistKey<>'$Valid' and VerifKey='0'"); // ExistKey = 0 | VerifKey = 0 = NO
$nb= mysql_num_rows($req); if ( $nb > 0 ) {header ('Location: KeyProduct.php'); }
$req=mysql_query("select * from Key_Computrace where ExistKey='$Valid' and VerifKey='0'"); // ExistKey = 1 | VerifKey = 0 = YES
$nb= mysql_num_rows($req); if ( $nb > 0 ) {
$req = mysql_query("INSERT INTO Key_Computrace ('VerifKey') VALUES ('$Valid'"); header ('Location: Validite.php'); }
}
?>
Merci de votre aide
----------
OS : Windows XP SP3 et Vista 32
Platforme : VB 6.0 + SP6
Ok VB6.0 c'est pas net !