Jump to content

MaaSTaaR

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by MaaSTaaR

  1. You can use empty() to check if $item1 and $item2 are empty as the following : $query = "select stores,item1,item2 from wp_dbt_nonnis_distro_data where state = '$_GET[state]' order by stores asc"; $result = mysql_query($query,$conn); while ($row = mysql_fetch_array($result)){ $stores = $row['stores']; $item1= $row['item1']; $item2= $row['item2']; if ( !empty( $item1 ) ) $new1 = str_replace(',', '</li><li>', $item1); else $new1 = 'Not Available'; if ( !empty( $item2 ) ) $new2 = str_replace(',', '</li><li>', $item2); else $new2 = 'Not Available'; echo <<<END <div class="stores"> <h2>Store Name: $stores</h2> <h3>Brands Carried:</h3> <div class="items"> <p>Item1</p> <ul><li>$new1</li></ul> </div> <div class="items"> <p>Item2</p> <ul><li>$new2</li></ul> </div> </div> END; }
  2. Use mod_rewrite to do that There are a lot of tutorials that explain mod_rewrite, just use Google.
  3. I'm not sure how CodeIgniter works but I think you need func_get_args : http://php.net/manual/en/function.func-get-args.php
  4. In these lines : $sql = "UPDATE orders SET sent_order_confirm = 'yes' WHERE order_num = $order_num"; $result=mysql_query($sql); Change the variable name "$result" to anything else. Example : $sql = "UPDATE orders SET sent_order_confirm = 'yes' WHERE order_num = $order_num"; $update=mysql_query($sql);
×
×
  • 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.