Search Results

Search found 133 results on 6 pages for 'sajid ahmad'.

Page 6/6 | < Previous Page | 2 3 4 5 6 

  • Send mail to multiple recipient

    - by Ahmad Maslan
    Hi, i have already research on using the mail() to send to multiple recipient's but i just cant get it to work. What im trying to do is, for every order that i have, order 1,2,3, each having their own email addresses, when i change their order status from pending to confirm, the mail() will use that id to refer to the db table and send the email of those 3 orders. But for my case, it mailed just the latest order which is order 3. This is the form that i use to change the order status. <form action="results-action" method="post" enctype="multipart/form-data"> <fieldset> <table id ="table_id" class="display"> <thead> <tr><td><h2>Pending Order</h2></td></tr> <tr> <th scope="col">Order ID</th> <th scope="col"> </th> <th scope="col">Name</th> <th scope="col">Address</th> <th scope="col">Product Name</th> <th scope="col">Produt Quantity</th> <th scope="col">Price</th> <th scope="col">Order status</th> </tr> </thead> <tbody> <?php while ($row = mysqli_fetch_array($result)) { ?> <tr> <td><input type="text" value='<?=$row['virtuemart_order_id']?>' name="orderid" id="virtuemart_order_id"></td> <td><input type="hidden" value='<?=$row['virtuemart_product_id']?>' name="productid" id="virtuemart_product_id"></td> <td><?=$row['first_name']?></td> <td><?=$row['address_1']?></td> <td><?=$row['order_item_name']?></td> <td><?=$row['product_quantity']?></td> <td><?=$row['product_final_price'] ?></td> <td><select name='change[<?=$row['virtuemart_order_id']?>]'> <option value='C'> Confirmed</option> <option value='X'> Cancelled</option></select></td> </tr> <?php } ?> </tbody> </table> </fieldset> <fieldset> <table> <tr> <td><input type="submit" value="Update status" name="update status"> </td> </tr> </table> </fieldset> </form> This is the php, using the order id from the form to select the email addresses. <?php $orderid = $_POST['orderid']; // build SQL statement to select email addresses $query3 = "SELECT email from ruj3d_virtuemart_order_userinfos where virtuemart_order_id = '$orderid'"; // execute SQL statement $result3 = mysqli_query($link, $query3) or die(mysqli_error($link)); $subject = "Order confirmed by Home and decor"; $message = "Hello! This is a message to inform that your order has been confirmed"; $from = "[email protected]"; $headers = "From: $from"; while($row3 = mysqli_fetch_array($result3)){ $addresses[] = $row3['email']; } $to = implode(",", $addresses); mail($to, $subject, $message, $headers); ?>

    Read the article

  • Magento table rates custom options

    - by Usman Ahmad
    in Tablerate.php I want to change the calculation. So for some Products with custom options like width, height the shipping cost must change. I tried with this method to find out if one product in cart has width or height greater than 60cm (example). But currently I have no Idea how to get custom option values... this code working well. foreach ($request->getAllItems() as $item) { echo 'Name: '.$item->getName(). '<br/> SKU:'.$item->getSku(). '<br/> ProductID: '.$item->getProductId(). '<br/> Price: '.$item->getPrice().'<br/>'; } Thanks

    Read the article

  • parsing multiple child with sax parser in Android

    - by Ahmad Naqibul Arefin
    I can parse xml file with sax parser, but when I need to add child attribute under a attribute then how I can get the value? my xml file is here: <?xml version="1.0" encoding="UTF-8"?> <marketlist> <market> <name restricted="yes">boss</name> <motorway>M6</motorway> <junction>J3</junction> <petrol_hour> <mon>7am - 8pm</mon> <tues>7am - 8pm</tues> </petrol_hour> </market> I want to parse and get mon and tues values. Any suggesstion? My android code for parsing is here: public void endElement(String uri, String localName, String qName) throws SAXException { elementOn = false; /** * Sets the values after retrieving the values from the XML tags * */ if (localName.equalsIgnoreCase("name")) data.setMarketName(elementValue); else if (localName.equalsIgnoreCase("motorway")) data.setMotorway(elementValue); else if (localName.equalsIgnoreCase("junction")) data.setJunction(elementValue);

    Read the article

  • iOS dynamic object creation

    - by Abdul Ahmad
    I've worked with Xcode and iOS on a few personal projects and have always used non-object-oriented designs for everything... just because I've been doing mostly learning/experimenting with things. Now I've been trying to implement some object oriented design into one game I've made previously. The idea is, I have a space ship that can shoot bullets. In the past I basically added the UIImageView to the storyboard and then connected it to the .h file and from there did things on it like move it around or whatever (using CGPointMake). The idea now is to make a method (and a whole other class soon) that will create a UIImageView programmatically, allocate it, add it to the superview etc... I've got this working so far, easy stuff, but the next part is a bit harder. Where do I store this local variable "bullet"? I've been saving it to an NSMutableArray and doing the following: (actually here are the methods that I have) -(void)movement { for (int i = 0; i < [array1 count]; i ++) { UIImageView *a = [array1 objectAtIndex:i]; a.center = CGPointMake(a.center.x + 2, a.center.y); if (a.center.x > 500) { [array1 removeObjectAtIndex:i]; [a removeFromSuperview]; } } } -(void)getBullet { UIImageView *bullet = [[UIImageView alloc] initWithFrame:CGRectMake(ship.center.x + 20, ship.center.y - 2, 15, 3)]; bullet.image = [UIImage imageNamed:@"bullet2.png"]; bullet.hidden = NO; [self.view addSubview:bullet]; [array1 addObject:bullet]; } (by the way, array1 is declared in the .h file) and theres a timer that controls the movement method timer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(movement) userInfo:nil repeats:YES]; first question is: what is the correct way of doing this? Storing a bullet for example until it is removed from the superview, should I store it another way? and another question is, when I remove a UIImageView from the superview, does that remove it from memory so its not using up system resources? Thank you for the help! (will update if I Think of other questions

    Read the article

  • How can I use from ismember

    - by ahmad hosseini
    Assuming A=[32512199.30 5401000.29 347.33 32512199.69 5401000.45 347.39 32512199.67 5401001.32 353.58 32512199.96 5401001.50 346.99 32512196.71 5401001.69 346.62 ] and B=[32512199.30 5401000.29 347.33 32512199.69 5401000.45 347.39 32512199.67 5401001.32 347.00 32512198.85 5401000.91 347.25 32512196.71 5401001.69 346.87 ] I want using ismember extract the rows that have same X and Y and different Z. X is first column, Y is the second and Z is third. in A and B I want extract from A 32512199.67 5401001.32 353.58 and 32512196.71 5401001.69 346.62 OR from B 32512199.67 5401001.32 347.00 and 32512196.71 5401001.69 346.87 How can I do it?

    Read the article

  • Convert text files to excel files using python

    - by Rahim Jaafar
    I am working on INFORMIX 4GL programs. That programs produce output text files.This is an example of the output: Lot No|Purchaser name|Billing|Payment|Deposit|Balance| J1006|JAUHARI BIN HAMIDI|5285.05|4923.25|0.00|361.80| J1007|LEE, CHIA-JUI AKA LEE, ANDREW J. R.|5366.15|5313.70|0.00|52.45| J1008|NAZRIN ANEEZA BINTI NAZARUDDIN|5669.55|5365.30|0.00|304.25| J1009|YAZID LUTFI BIN AHMAD LUTFI|3180.05|3022.30|0.00|157.75| This text files can manually convert to excel files.But, I wanna ask, is there any script that I can use to convert .txt files to .xls files ? Hi all,now I'm already can convert text files to excell file by python using script that was given from user named Rami Helmy.A big thanks for him.But now,That script will produce more than one excell files depends on the number of '|' from the text files.Beside that,That script also can only convert one text files.I a going to convert all text files without state the name of text files.Therefore,I am looking such a way on how to this script going to: output only one excell file convert all .txt files from the directory that was given from user. output excell's file name are automaticly copied from the file name of text files. I am new in python,hopefully someone can help me to solve my problems.Thank You.. done all the task,but there was something that I'm confused.. that output excell files contains an "square" symbol like this: then, how can I ensure that there is no square symbol like that after I convert from text files to excell? thank you...

    Read the article

  • How to upload a file into database by using Servlet?

    - by user1765496
    Hi all iam working on servlets, so i need to upload a file by using servlet as follows my code. package com.limrasoft.image.servlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.annotation.*; import java.sql.*; @WebServlet(name="serv1",value="/s1") public class Account extends HttpServlet{ public void doPost(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException{ try{ Class.forName("oracle.jdbc.driver.OracleDriver"); Connecection con=null; try{ con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","sajid"); PrintWriter pw=res.getWriter(); res.setContentType("text/html"); String s1=req.getParameter("un"); string s2=req.getParameter("pwd"); String s3=req.getParameter("g"); String s4=req.getParameter("uf"); PreparedStatement ps=con.prepareStatement("insert into account(?,?,?,?)"); ps.setString(1,s1); ps.setString(2,s2); ps.setString(3,s3); File file=new File("+s4+"); FileInputStream fis=new FileInputStream(fis); int len=(int)file.length(); ps.setBinaryStream(4,fis,len); int c=ps.executeUpdate(); if(c==0){pw.println("<h1>Registratin fail");} else{pw.println("<h1>Registration fail");} } finally{if(con!=null)con.close();} } catch(ClassNotFoundException ce){pw.println("<h1>Registration Fail");} catch(SQLException se){pw.println("<h1>Registration Fail");} pw.flush(); pw.close(); } } I have written the above code for file upload into database, but it giving error as "HTTP Status 500 - Servlet3.java (The system cannot find the file specified)" Could you plz help me to do this code,thanks in advanse.

    Read the article

  • how use graphvis in C# application?

    - by ghasedak -
    i have a dot format file and i download graphvis for windows now how can i use graphvis to show a graph in my c# application? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using VDS.RDF; using VDS.RDF.Parsing; using VDS.RDF.Query; using System.IO; using System.Windows; using System.Runtime.InteropServices; using VDS.RDF.Writing; using System.Diagnostics; namespace WindowsFormsApplication2 { public partial class first : Form { Graph g = new Graph(); string s1 = null; /**************************************DATA********************************************/ public first() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Stream myStream = null; var parser = new Notation3Parser(); var graph = new Graph(); OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.Filter = "RDF files (*.n3)|*.n3"; openFileDialog1.FilterIndex = 1; openFileDialog1.RestoreDirectory = true; openFileDialog1.Multiselect = false; if (openFileDialog1.ShowDialog() == DialogResult.OK) { try { if ((myStream = openFileDialog1.OpenFile()) != null) { using (myStream) { string s = openFileDialog1.FileName.ToString(); string w= Directory.GetCurrentDirectory().ToString(); string Fname = openFileDialog1.SafeFileName.ToString(); File.Copy(s,Path.Combine(w,Fname),true); // Insert code to read the stream here. Win32.AllocConsole(); s1 = Path.Combine(w, Fname); insertNodeButton.Visible = true; delBut.Visible = true; simi.Visible = true; showNodes showNodes1 = new showNodes(s1); g = showNodes1.returngraph(); Console.Read(); Win32.FreeConsole(); // g.SaveToFile("firstfile.n3"); this.Show(); } } } catch (Exception ex) { MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message); } } GraphVizWriter hi = new GraphVizWriter(); hi.Save(g, "c:\\ahmad.dot"); } private void button2_Click(object sender, EventArgs e) { string strCmdLine = Application.StartupPath + "\\Tools\\rdfEditor.exe"; //string strCmdLine = "DIR"; MessageBox.Show(strCmdLine); System.Diagnostics.Process process1; process1 = new System.Diagnostics.Process(); //Do not receive an event when the process exits. process1.EnableRaisingEvents = false; //The "/C" Tells Windows to Run The Command then Terminate System.Diagnostics.Process.Start(strCmdLine); process1.Close(); } private void Form1_Load(object sender, EventArgs e) { } private void insertNodeButton_Click(object sender, EventArgs e) { //Graph parentvalue = this.g; //String parentvalueadress = this.s1; addTriple a1 = new addTriple(); a1.G = g; a1.BringToFront(); a1.ShowDialog(); g = a1.G; g.SaveToFile("c:\\Hi.n3"); } this is my code i want to visul saly dot file format to show a graph with graphvis

    Read the article

< Previous Page | 2 3 4 5 6