Jump to content

Please help in modifying the code


k7l2010

Recommended Posts

مرحبا من فضلك مساعدة ماذا يفتقر هذا الرمز للعمل؟ مطلوب عدم تكرار الحقل في ملف نصي يرجى تعديل الكود

<?php

if(isset($_POST['send'])){
$b1 = $_POST['b1'];
$b2 = $_POST['b2'];


$file = fopen("xm.txt", "a+");

				for($i = 0; $i < count($file); $i++){
					$read = explode("||" ,$file[$i]);
 

    if($read[0] == $b1  ){

        echo 'Duplicate';
 
}
else
{

 

   fwrite($random_file,$b1.'||'.$b2."\r\n");
  fclose($random_file);

 
   }

}

}

?>

 

Edited by k7l2010
Link to comment
Share on other sites

  • Barand locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.