Jump to content

HuggieBear

Members
  • Posts

    1,899
  • Joined

  • Last visited

Everything posted by HuggieBear

  1. Change this on line 52... [code=php:0] $sql = "SELECT * FROM `chattext` WHERE `chatDate` = '$chatDate'"; [/code] To this: [code=php:0] $sql = "SELECT * FROM `chatText` WHERE `chatDate` = '$chatDate'"; [/code] I believe there's a case-sensitivity issue... You'll also need to change line 42 from [color=red]chattext[/color] to [color=green]chatText[/color] Regards Huggie
  2. Can you not insert all the data into your database first, including a uniqueID of some kind, then pass the unique ID to PayPal in the optional field.  When PayPal returns that field, along with the notification of APPROVED or whatever it is they do, then you can use the uniqueID to get all the information that you need back from the database? Why not just process it first, why post the information to PayPal at all? Regards Huggie
  3. No problem, that's what we're here for!  :D Regards Huggie
  4. Here's a very good Ajax IM solution.... http://www.unwieldy.net/ajaxim/ You can even try it out when you get there, although it's less of a chat engine and more of a messenger engine. Regards Huggie
  5. No problem, incidently, I found that information out myself by looking at the MySQL manual. The link for which can be found in my signature.  I just did a search for [color=green]wildcard AND like[/color] Regards Huggie
  6. In MySQL you can use two wildcard characters, you know one of them, that's the percent sign (%) the other is the underscore (_).  The percent sign matches any number of characters, whereas the underscore matches one single character. [code=php:0]$sql = "SELECT * FROM table WHERE column LIKE '__xx____'"; [/code] Regards Huggie
  7. You need to call the trunc() function with some values.  Using the code that both of you posted, I'd try something like this... [code]<?php $query  = "SELECT * FROM News LIMIT 0, 1"; $result = mysql_query($query); function trunc($details, $max){   if (strlen($details) > $max){       $details = substr($details, 0, $max);       $i = strrpos($details," ");       $details = substr($details, 0, $i);       $details = $details."...";   }   return $details; } while($row = mysql_fetch_array($result, MYSQL_ASSOC)){   $main = trunc($row['Main'], 200); // You see the call here to the above function   echo <<<HTML   <h6>{$row['Date']}<br><a href="{$row['Newsid']}">{$row['Heading']}</a><br>{$row['Subhead']}<br>{$main}</h6> HTML; } ?>[/code] Regards Huggie
  8. [quote author=vbnullchar link=topic=111046.msg449746#msg449746 date=1160477889] still no.  I wanted to create a navigation similar to this, where you can just click the previous level PHP Freaks Forums > PHP and MySQL > PHP Help > bread crumb navigation [/quote] OK, I don't know if you didn't read the page where I sent you or just didn't understand, but the link I posted was to some code for breadcrumb navigation that allows you to click the previous levels.  There were even over 25 examples when showing the different options with the code. I think I'm going to have to bail out of this one, good luck with finding what you're after Regards Huggie
  9. Did you try this one, it's advanced and has lots of configurable options... http://www.baskettcase.com/classes/breadcrumb/ If it's not what you're after, perhaps a better explanation is in order? Regards Huggie
  10. Try [url=http://uk.php.net/manual/en/function.htmlentities.php]htmlentities()[/url] Regards Huggie
  11. If you mean CAPTCHA code, then you could try [url=http://www.hotscripts.com]hotscripts[/url].  I know they have a few there. Regards Huggie
  12. Yes, you can attempt to resolve the name first by performing an MX Lookup. For further details try googling [url=http://www.google.co.uk/search?hl=en&q=%22Validate+email%22+%2Blookup&btnG=Search&meta=]"Validate Email" +Lookup[/url] Regards Huggie
  13. There's a couple of nice ones here: [url=http://www.hotscripts.com]Hotscripts[/url] Regards Huggie
  14. You have no semicolon after [code=php:0]$i = 0[/code] in your while loop. Regards Huggie
  15. As far as I'm aware you can't use '*' wildcards for column names in a 'where' clause... use 'or' [code] "SELECT * FROM individuals WHERE Company1 LIKE ('%$for%') OR Company2 LIKE ('%$for%') OR Company3 LIKE ('%$for%')... [/code] Regards Huggie
  16. My advice would be to post in this board if you're using apache... [url=http://www.phpfreaks.com/forums/index.php/board,2.0.html]Apache Server[/url] Regards Huggie
  17. Is there a reason why you changed the table aliases? Anyway, probably best to give your columns aliases too, so where you have: [code]SELECT websites.websites_id, websites_hits.websites_user FROM websites[/code] Change it to: [code]SELECT websites.websites_id AS WebID, websites_hits.websites_user AS WebUser FROM websites[/code] Then in your php, use the aliases: [code]while($array = mysql_fetch_array($query)){   echo $array['WebID']; }|[/code] Regards Huggie
  18. You need values in your checkbox really as you won't be able to distinguish between size... [code]<input type="checkbox" name="size_id[]" id="size_id[]" value="Large"> <input type="checkbox" name="size_id[]" id="size_id[]" value="Medium"> <input type="checkbox" name="size_id[]" id="size_id[]" value="Small"> [/code] If they're checked they return the value in value, if they're not, then they don't. Rgards Huggie
  19. [quote author=netfrugal link=topic=110978.msg449400#msg449400 date=1160417366] Do the search parameters get lost after one page?  [/quote] Yes, unless you save them in a session variable, or pass them in the URL along with the page number (I think the second is probably preferable in your case). Say your form submits with a URL like this: [color=green]http://www.mydom.com/paginate.php?cat=shirts&sort=asc[/color] Then the links in your paginate page should look a little like this: [code=php:0] echo <<<HTML <a href="paginate.php?cat={$_GET['cat']}&sort={$_GET['sort']}&page={$i}">$i</a> HTML; [/code] This would take you to the following url: [color=green]http://www.mydom.com/paginate.php?cat=shirts&sort=asc&page=2[/color] I've used heredoc syntax to escape the HTML above, if you're unaware of this, look it up here: [url=http://uk.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc]heredoc[/url] Regards Huggie
  20. OK, Try this: [code]$sql = "SELECT w.websites_id, wh.websites_user FROM websites w LEFT JOIN websites_hits wh ON (w.websites_id = wh.websites_id AND wh.websites_user = '$member') WHERE wh.websites_user is null";[/code] $member is the value of your logged in member. Regards Huggie
  21. You've only provided lines 1-15 :) Regards Huggie
  22. The following code should work: [code] $sql = "SELECT w.websites_id, wh.websites_user FROM websites w LEFT JOIN websites_hits wh ON (w.websites_id = wh.websites_id) WHERE wh.websites_user is null"; [/code] Regards Huggie
  23. Red: Try this one [url=http://www.w3schools.com/sql/sql_join.asp]W3Schools[/url] Regards Huggie
  24. This code should work... [code] $sql = "SELECT w.websites_id FROM websites w WHERE w.website_id NOT IN (SELECT distinct(wh.websites_id) FROM websites_hits wh WHERE wh.websites_user = '$member_id')"; [/code] [size=8pt][color=red][b]Edit:[/b][/color] On second thoughts, I'm not sure this will work.  I'm investigating 'NOT IN' further[/size] Regards Huggie
  25. Use this: [code]$fre = mysql_query("SELECT * FROM friends WHERE (username_to = '$player' OR username_from = '$player') AND accepted='Yes'");[/code] Regards Huggie
×
×
  • 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.