Jump to content

dgoosens

Members
  • Posts

    230
  • Joined

  • Last visited

Everything posted by dgoosens

  1. my guess is the problem the "and" here: $q .= " `" . addslashes($field) . "` $comp '" . addslashes($val) . "' and"; as for some cases it probably should be "OR"
  2. not quite sure I got this right, but if you want to put the offlines after the onlines, you could just add an if statement in you foreach loop: foreach( $xml->PresenceInfo as $lvl1 ){ if($lvl1->StatusText == "Online"){ echo 'Status: '.$lvl1->Info.'<br />'; echo 'Online/Offline: '.$lvl1->StatusText.'<br />'; echo 'Game: '.$lvl1->Title.'<br />'; echo 'Likes Sex: Yes'.'<br />'; } else { $arrayForLater[] = $lvl1; } } then, after this foreach loop, you just have to go through the offlines: foreach ($arrayForLater as $id => $lvl1) { echo 'Status: '.$lvl1->Info.'<br />'; echo 'Online/Offline: '.$lvl1->StatusText.'<br />'; echo 'Game: '.$lvl1->Title.'<br />'; echo 'Likes Sex: Yes'.'<br />'; }
  3. ... you know, you are allowed to put more than one sentence in a paragraph... This is really hard to understand. Anyways, you might also want to post your mysql.php script where, I guess, we can see what that smart_select function does.
  4. hi Kevin, I think the smartest way to do this is to check whether the "." is followed by a space AND an uppercase... Although... it gets harder when you have ...Dr. Newton... or something like this. In that case, I would try to get my hands on a list of common abbreviations.
  5. that's the good question... but what are you trying to achieve ?? we might come up with alternate solutions...
  6. try like this: <?php if(isset($_SESSION['delete'])) echo "<script language=javascript>alert('Customer Deleted')</script>"; $_SESSION['delete'] = null; ?>
  7. this is really very strange XML... you should be able to access thoses nodes with $xml->Category->Category;
  8. well, it does matter though... how do you expect to communicate with it ?
  9. but why would you want to launch the console on the client's machine ? What is supposed to happen next ?
  10. even if it were possible, why would a Windows user want to open a console ? I mean, Linux users most of the time know what a console is... but I am pretty sure that a webpage that would open a Windows console would freak most of the users out !! what are you trying to get done exactly ? try to explain that clearly and we might come up with a solution...
  11. just so you know... Outlook 2007 does not allow you to use width's it does not allow background images neither (nor do Gmail's webclient, and Hotmail...) actually, Outlook 2007 does not allow a lot of things... This is because the people at M$ figured it would be a good idea to use Word instead of IE to render the mails... Ergo, creating web mails is a real pain !! You might want to check out these sites... I've found them rather useful: http://www.alistapart.com/articles/cssemail/ http://xavierfrenette.com/articles/css-support-in-webmail/ http://www.campaignmonitor.com/blog/post/2533/a-guide-to-css-support-in-emai-2/ because of all this, you really should not look at mail-creation as a simple HTML coding... also, bear in mind that there are regulations about mailings... for instance, you have to allow users to unsubscribe from you mailing list...
  12. PHP runs server side... This means it has no ways of communicating directly with the client's machine... What you're trying to achieve is not possible with PHP.
  13. just google for it and more or less everyone who is a little computer literate is able to change his MAC-address...
  14. although this is not good practice, you can allow the shorttags by editing the php.ini file. Search for the line with "short_open_tag" and put on "on" short_open_tag = On EDIT: Oh, and don't forget to restart Apache...
  15. quite possible that the shorttags are not allowed in your EasyPhp install... try like this: <?php include("header.html"); ?> <div id="home"> </div> <?php include("footer.html"); ?>
  16. lol well Little Guy... there you have it... the idea AND the code... nice one mattal999 !
  17. hi, there is something wrong here: $sql = "REPLACE INTO `businesses` (`$business_id`, `user_id`,`BusinessName`,`AddressOne`,`AddressTwo`,`Number`,`PostCode`,`City`,`County`,`Country`,`Forename`,`Surname`,`Title`) VALUES ( $business_id, $user_id, '$BusinessName', '$AddressOne', '$AddressTwo', '$Number', '$PostCode', '$City', '$County', '$Country', '$Forename', '$Surname', '$Title' )"; not sure there should be any variables in the first section... also, make sure you put all the variables in the VALUES between quotes
  18. you could work as described here: http://www.codediesel.com/mysql/selecting-all-except-some-columns-in-mysql/ 1. you get the list of all your columns 2. you go through the list and exclude the columns 3. you create the query
  19. try using another name for your function than "sort" sort() also is a PHP fnc maybe that causes the error... apart from that, your code seems fine to me
  20. you could use uasort() and write your own comparison filter... http://uk.php.net/manual/en/function.uasort.php
  21. hi, my first thought was a explode() the whole string based on the \n after that you loop through the items. If the string starts (substr()) with "* ", you replace it with <li> and close the tag after the string. finally, you'd have to build in a system to add the <ul> and </ul> tags. best thing would be to add the <ul> when the loop encounters the first "* ", add a closing and new opening tag when the loop encounters a blank and close the tag at the end. maybe there are smarter ways to get this done...
  22. maybe you could post one of those files here... also, what about an exclusion list ?
  23. is it "1" (one) or "l" (L) ?? in code it is not very clear $1a; // one $la; // L
  24. would it be possible to make an exclusion list ?
  25. well, here again... you should use a variable to get the response you're getting from mysql_query do go through the doc and the examples here: http://uk.php.net/manual/en/function.mysql-query.php
×
×
  • 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.