Feb 17, 2019 03:25 PM
(This post was last modified: Feb 17, 2019 03:26 PM by blackcoder00.)
hi guys i need help in this script the problem is :
in the first statment the script insert the values without error but after inserting he don't print the new values what are the mistakes i made guys ?
i think the problem is here guys :
in the first statment the script insert the values without error but after inserting he don't print the new values what are the mistakes i made guys ?
PHP Code
<?php
$n1=$_POST['fname'];$n2=$_POST['lname'];$n3=$_POST['cd'];
$khalil1=mysql_query("select * from client where nom='$n1'");
if(mysql_num_rows($khalil1)==0){
$khalil2=mysql_query("insert into client values ('$n1','$n2','')");
if($khalil2){
while($khalil10=mysql_fetch_array($khalil1)){
echo"<br /> <b><p>Vente Profilée & Accessoire <div class='right'><p>Code client: ".$khalil10['code']." <br /> Nom Client : ".$n1." </br> MAT. fiscal :".$n2." <br /> <br /></p></div><br /><br /> Aluminium Center <br /> <br />Rue Halab <br /> <br />Tel : </p></b>";
}
}
}else if(mysql_num_rows($khalil1)!=0){
while($khalil3=mysql_fetch_array($khalil1)){
echo"<br /> <b><p>Vente Profilée & Accessoire <div class='right'><p>Code client: ".$khalil3['code']." <br /> Nom Client : ".$n1." </br> MAT. fiscal :".$n2." <br /> <br /></p></div><br /><br /> Aluminium Center <br /> <br /> Rue Halab <br /> <br />Tel : </p></b>";
}
}
PHP Code
<?php
$khalil1=mysql_query("select * from client where nom='$n1'");
if(mysql_num_rows($khalil1)==0){
$khalil2=mysql_query("insert into client values ('$n1','$n2','')");
if($khalil2){
while($khalil10=mysql_fetch_array($khalil1)){
echo"<br /> <b><p>Vente Profilée & Accessoire <div class='right'><p>Code client: ".$khalil10['code']." <br /> Nom Client : ".$n1." </br> MAT. fiscal :".$n2." <br /> <br /></p></div><br /><br /> Aluminium Center <br /> <br />Rue Halab <br /> <br />Tel : </p></b>";
}
}
}
Writeln('Give me a Target >');
![[Image: giphy.gif]](https://media.giphy.com/media/1n6CecAWjqgaa0fv0K/giphy.gif)

