Jump to content

dizel247

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dizel247's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I am trying a very simple csv import to mysql. When I import the file, it imports blanks. After my search, I realize my page doesn't pass actual path of the file, it passes just file name. When I manually add the path of the file it imports with no problem. Can some one point me to the right direction. Thanks in advance. Roman Code Bellow: page1.php Page2.php Debug: Array ( [report_name] => 2 [account_type] => 1 [userfile] => test.csv [submit] => submit ) test.csv insert into tb_accounts (carrier_code, minutes, profit, revenue, cost, report_id, account_type) values ('', '', '', '', '', '2', '1')
  2. Thank you all for a quick reply. Best Regards, Roman
  3. Hello, Can some one help me with while loop expression. I am looping from the database email adresse. This is how I do it. //Select User Email from Database $rsUserEmail = mysql_query("SELECT * FROM contacts WHERE carrier_id = '$cid' AND contacts.rates = '1'") or die(mysql_error());  // store the record of the "example" table into $row while($row = mysql_fetch_array($rsUserEmail)){ // Print out the contents of the entry $email = $row['contact_email']; echo "$email; "; // Here I get result a@aol.com; b@aol.com; c@aol.com; } echo "Emails Will be $email"; //Here I get: Emails Will be c@aol.com Now when I refer to the $emails I only get one email. My question is.. How do I store loop in the variable. So I can refrence it anytime. Also I need my result to be a@aol.com; b@aol.com; c@aol.com <--- no ; at the end. Thanks, Roman
  4. Hello, I am writing an email app that will email files to the companies that we are working with. I have a 2 tables in mysql database. Table Carriers Table2 Contacts My problem is this. First I would like my users to select the what carriers to send email to. I do that by using check boxes. Then when I am on the next screen I need to send an email to each companies using their conctast from the database. For each email Subject and Body uses that company name. I belive I need to use Arays. I use check boxes for carrier_id as my array. So when I loop I get   <?php   $companies = $_GET['cbox'];   foreach($companies as $id => $carrier){   echo "Carrier ID: $carrier <br/>"; } ?> CarrierID 3 CarrierID 4 ________________________________ Now problem 1. How do I display carrier_id and carrier_name that belongs to that id. Problem 2. How do I pull emails from the database using loop refrencing carrier_id. What I currently think i need to use Loop. 1. Loop carrier Name using carrier_id     get user emails       send email repeat loop. Can some one please point me to the right direction. I am so uncofortable with loops. Thanks in advance, Roman
  5. [!--quoteo(post=381996:date=Jun 9 2006, 02:48 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Jun 9 2006, 02:48 PM) [snapback]381996[/snapback][/div][div class=\'quotemain\'][!--quotec--] Use implode() instead: [a href=\"http://www.php.net/implode\" target=\"_blank\"]http://www.php.net/implode[/a] [code]implode('; ', $_POST['cbox']);[/code] [/quote] wow, thanks for a quick reply. That did a trick. Roman
  6. Hello, I have a code that user selects using checkboxes email addresses and sends email. My problem with the code is that I always need to delete last _; from the end of the string, otherwise email gives error. Code: <?php if ($cbox=$_POST['cbox']){ foreach ($cbox as $key => $eemail ) echo "$eemail; "; } ?> Result I get: a@aol.com; b@aol.com; c@aol.com; Result I need is: a@aol.com; b@aol.com; c@aol.com (;_)<<<<< this needs to be removed. How can I implement a code that will do it automatically? Thanks in advance, Roman K
×
×
  • 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.