Jump to content

MaaSTaaR

Members
  • Posts

    26
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.maastaar.com

Profile Information

  • Gender
    Male
  • Location
    Kuwait

MaaSTaaR's Achievements

Newbie

Newbie (1/5)

0

Reputation

  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);
  5. Hello Before this line : while ($row = mysqli_fetch_array($result)) Add : $items = array();
  6. Try to put it before this line : $dir_length = count($list);
  7. Hello ... try : echo "\"First name\",\"belong's to\"";
  8. Useful information, Thanks. Gecko support it? (http://developer.mozilla.org/en/docs/How_to_Turn_Off_Form_Autocompletion)
  9. Hello ... use "while" to get all results : while ($info = mysqli_fetch_array($result)) { echo $info['email'] . '<br />'; }
  10. Hello ... In the head of submit page add : print_r($_POST); and tell us what is the result.
  11. Hello .. I don't know if I understood you correctly or not, but you may want to do something like that : if (!$get_email) { die("You are missing some information!"); }
  12. Hmmm , i think you need to hacking PHP code to do something like that , becuase it's a statement and not function . you can do it with PHP by compile it , i mean write function open the php source file and search the "loop" statement in the php source file , if find the statement replace it by real loop statement like "while" or "for" , i mean do something like templates engine (for example Smarty) .
  13. i know a very very bit of assembly , and i plan to be good in it but it think it will need very long time .
  14. i don't know if i understand you correctly , but as i understand you want to unactive some accounts when their users aren't in the company . If i right , i think you have dual solution , the first solution is unactive these accounts after X clock , i mean in the login script you can check server time , if the server time is 3 PM or high stop the log in , otherwise if the time is between 8 AM to 2 PM login without any problem . the second solution you can do it if you have Unix server by Corn jobs .
  15. try this :) [code=php:0] <?php $string = '<td width="50%" class="playerbio">                     <b>Height/Weight: </b> 6-6/229<br>                     <b>Birthdate: </b> 04/22/1983<br>                     <b>Birthplace: </b> Fort Smith, AR, USA<br>                                       </td>                   <td width="50%" class="playerbio">                     <b>Team: </b> Jacksonville Jaguars<br>                     <b>College: </b> Arkansas<br>';                     $search = "~</b>\s*(.*?)\s*<br>~ise"; $replace = "replace('\\1')"; $do_search = preg_replace($search,$replace,$string); function replace($text) { echo $text . '<br />'; } ?> [/code] try this page : http://gnosis.cx/publish/programming/regular_expressions.html it's great :)
×
×
  • 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.