Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Look at the source of the page or echo $node->field_img['und'][0]['filename'] to see if it contains what you are expecting.
  2. Did you try? I don't see why you couldn't.
  3. Using double quoted strings uses more processing than single quoted. If you're not putting a variable in them, there's no reason to use double quoted strings. If you are putting a variable in the string, sometimes you want to use " quotes in it. Now which looks better? <?php $str = "<div id=\"myDiv\"><p class=\"myClass\">This is a string with one $var in it. Someone said, \"This is a silly string\"</p></div>"; $str = '<div id="myDiv"><p class="myClass">This is a string with one '.$var.' in it. Someone said, "This is a silly string"</p></div>'; ?>
  4. 1. Those are radio buttons. 2. Do you want them to pick one from each row or one from each column, or one from all 16?
  5. It goes the other way too. I work with a lot of people who have names so long they word wrap in the terminal. *drum crash*
  6. For each one you need to echo a new <option> element. You have your while loop inside of one option instead of creating the options.
  7. Make the column auto-incrementing
  8. I have to agree. I'll second (or would it be third) that. You will NEVER get 100% accuracy. If you force the format based upon your rules you are going to save some names incorrectly. Granted, it might be a small percentage, but will sure makes those users unhappy. I have the problem that my last name routinely has an apostrophe added in many mailings I receive - even though I don't use one. I've had several instances of websites thinking they are smarter than me like this recently when trying to do security questions. Apple just recently made me pick 3 security questions. One of the options for the first question was "What was your first car". The third question option was "What was your least favorite car?". It wouldn't let me have the same car for both. Really Apple? My least favorite car WAS that car!! The worst though is when websites tell me my mother's maiden name must be longer than 3 characters. Funny, her birth certificate says otherwise...
  9. Rather than this business: $countSearch = count($arraySearch); $a = 0; $b = 0; $countFields = count($arrayFields); while ($a < $countFields) { while ($b < $countSearch) ... Use foreach(); foreach($arraySearch AS $searchKey=>$searchValue){ echo $searchValue; //your code here to put in LIKE(). } As for the problem, $arraySearch = explode(" ", $search); $search is never defined.
  10. That does look like exactly what I described. Try it and see how it works for you. Although that is searching more than one field and using AND. If you want to match ALL words use AND. If you want to match any word, use OR.
  11. You'll need to take that list and put it in an array using explode. Then use the array to build a WHERE clause using field LIKE ('%term%') OR field LIKE('%other term'%) etc.
  12. Hmmm... I would explode on spaces and ' (spaces for things like Von Deutch) and do ucwords on both, then implode them back together.
  13. $sql = "SELECT *FROM word WHERE MATCH(en) AGAINST ('ctx')"; $st = $con->prepare($sql); $st->bindValue(':word',$word,PDO::PARAM_STR); $st->execute(); Will this even work since your query string does not contain :word anywhere? Do you have error reporting on?
  14. Regular expressions are regular expressions regardless of what language you use them in.
  15. Don't double post. http://www.phpfreaks.com/forums/index.php?topic=358323.0 This is STILL a javascript question!!! Do you actually know javascript? I told you you need to create a javascript function which gets the value of BOTH select items. If you don't know javascript yet you need to learn some on your own first.
  16. I'm a little confused where the problem is. If he submits a phone number other than his own, won't the sms go to that phone number, not his? Either way, before sending the coupon, check if the user with that phone number/id/etc has enough points in the DB. Rather than trying to obscure the data, you must check and double check what is supplied to you.
  17. Wild guess, try putting the table name (and column names maybe) in backticks $sql="SELECT f_ReaderID FROM `t_b_Reader`"; Also please use code tags, not bold/italics etc.
  18. you need to turn error reporting on. | | V
  19. Do you actually have a bunch of ... above it???
  20. .... subtract it from 1?
×
×
  • 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.