Jump to content

breaststroke

Members
  • Posts

    56
  • Joined

  • Last visited

breaststroke's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I've found a solution, at least it has worked once. I had and have to do this: if($reg=mysql_fetch_array($registros2))since it belongs to $registros2. I hope it keeps working... birbal, thank you very much for replying, I hadn't seen your last message till after submitting mine. It seems I found the solution. I guess the While loop got stopped when it came across that wrong $registros.I'll check the links you provide. I didn't know about thoem and I am sure they'll come in handy.thank you very much again! p.s I have to do that when I do a query through $registros2, before the Update
  2. Hello! Thank you for replying.It doesn't return any errors. But only one e-mail is sent and the last query to the database doesn´t work either (there is no such UPDATE).
  3. Hello, I have a problem involving Phpmailer and a While loop. Actually I have always had problems to sending emails this way. Now for instance I can send e-mails trough an IF (instead of While) and the following script works fine. But as soon as I change it into While it doesn't. Even the last part of the script (UPDATE) doesn't work (it worked upon IF). I am trying with just two e-mails to be sent and only the first one is sent.I would be so happy to solve this issue. While loop is really important when it comes to sending e-mails. This is my script: ...include('conexioninclude.php');mysql_set_charset('utf8');$registros=mysql_query("SELECT mail, name, password, codigo FROM alert WHERE status='on' AND language1='$language2' AND language2='$language1' AND way LIKE '%$way%' ORDER BY codigo",$conexion)ordie("Problems at selectt:".mysql_error());require("class.phpmailer.php");$mail = new PHPMailer();while($reg=mysql_fetch_array($registros)){$mailu=$reg['mail'];$namee=$reg['name'];$password=$reg['password'];$codigo=$reg['codigo'];$mail->IsSMTP();$mail->Port = 465;$mail->SMTPSecure = "ssl"; $mail->Host = "smtp.gmail.com"; $mail->SMTPAuth = true;$mail->Username = "xxxxx";$mail->Password = "xxxxxx"; // SMTP password$webmaster_email = "xxxxxx"; //Reply to this email ID$email="xxxxx"; // Recipients email ID$name="Admin"; // Recipient's name$mail->From = "xxxxxx";$mail->FromName = "Sharinglanguage.com";$mail->AddAddress($mailu,$namee);$mail->AddReplyTo(xxxxxx,"Webmaster");$mail->WordWrap = 50; // set word wrap$mail->SetLanguage("en","/php/language/");$mail->AddAttachment("/var/tmp/file.tar.gz");$mail->AddAttachment("/tmp/image.jpg", "phone.jpg");$mail->AddAttachment("image.jpg", "phone.jpg"); $mail->IsHTML(true); // send as HTML$mail->Subject = "xxxxxxxxx";$foto= "imagess/bonito.jpg";$mensaje='<font-color="#559999"><img src="'. $foto .'" width="600"><br /><br />Hello '.$namee.',<br /><br />xxxxxxxxxxxxxxxx .<br /><br />Sincerely yours</font>'; $mail->MsgHTML($mensaje);if(!$mail->Send()){print<<<HEREmessage wasn't sent;HERE;}else{$registros2=mysql_query("SELECT yep FROM vamos WHERE password='$password'",$conexion)ordie("Problems at selectt:".mysql_error());if($reg=mysql_fetch_array($registros)){$yep=$reg['yep']; // it's an Int type field (numbers)$saw=$yep+1;$registros3=mysql_query("UPDATE vamosSET yep='$saw'WHERE password='$password'",$conexion)ordie("Proble8uhims with selectttt:".mysql_error());}print<<<HEREsuccess!;HERE;}... Thank you very much in advance for any help. Regards
  4. Hi,I got it. The compareTo method is not for arranging Strings by their number of characteres but by their alphabetical order. Sorry!
  5. I don't know if it's necessary to say, but i am working on Java.I have realised the compareTo method works but only with Strings which start with the same letter. Then it arranges them properly.But it only arranges from lowest to higuest the String that start with the same letter.Isn't there a method which can be applied to any Strings regardless the letter they start with? p.s when above I say "order", I meant "arrange", "sort". English not being my native language..., sorry.
  6. Hello, I am trying to comprehend how to compare the length between Strings.i have the following, to compare the length of 10 countries inserted by the user. It also orders them from lowest to highest: public void load() { teclado=new Scanner(System.in); paises=new String[10]; for(int f=0;f<paises.length;f++) { System.out.print("Ingrese el nombre del pais:"); paises[f]=teclado.next(); } } public void ordenar() { for(int k=0;k<9;k++) { for(int f=0;f<9-k;f++) { if (paises[f].compareTo(paises[f+1])>0) { String aux; aux=paises[f]; paises[f]=paises[f+1]; paises[f+1]=aux; } } } } When I use the same method with numbers it works. For instance: public void ordenar() { for(int k=0;k<9;k++){ for(int f=0;f<9-k;f++) { if (vec[f+1]<vec[f]) { int aux; aux=vec[f]; vec[f]=vec[f+1]; vec[f+1]=aux; } } } } So I deduce maybe : if (paises[f].compareTo(paises[f+1])>0) is not correct, because it's the only difference comparing it to the method on numbers.Is there any other way to compare the length between Strings? thank you in advance. p.s I took it from a tutorial which has been working fine till now. I have even checked the "compareTo" on other sites and it seems to be appropriate but I don't know why it's not working here. I would appreciate any help.
  7. I have managed to solve it.I don't completely figure it out and since it is a very particular problem probably it's not neessary to explain (or try to.) what i have done.But if someone wants me to try I am ready and set. Regards
  8. Hello. I have created an animation which consists of several movie clips.I have added an stop at the end of the main Time Line so that everything gets stopped. But when managing one of this movie clips ('mywindow'), I don't know what I have done (I have gotten it to stop and to play later on) that now it disappears in the last frame, and it shouldn't.I don't know how to correct this and why this happened.I would appreciate any help.This is the link of the file: https://hotfile.com/...facade.fla.html Thank you vey much,Regards
×
×
  • Create New...