Jump to content

Nix

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

About Nix

  • Birthday 07/27/1989

Contact Methods

  • MSN
    im@phplab.biz
  • Website URL
    http://distorzija.com

Profile Information

  • Gender
    Male
  • Location
    Belgrade, Serbia

Nix's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Don't know if this is going to help, but I found this on the net: http://www.pixel2life.com/publish/tutorials/608/simple_private_messaging_system/ Regards! Nix
  2. Oh, I noticed that very few members actually filled out required data (region and instrument from their profiles)! That's why query was returning weird results :D Thank you for your time and effort in solving this "issue", kickstart! King regards!!!
  3. Tnx for reply Worked fine, listing significant amount of users. Also worked when I added WHERE prn_user_profile.up_instrument='". $instrument ."' at the end, but not when added WHERE prn_user_profile.up_instrument='". $instrument ."' AND prn_user_list.ul_region_id = '". $region ."' Any way that could be fixed?
  4. Hi, mates! The following query acts very strange, it returns only 1 result instead of X... I might be doing it wrong somewhere <?php $query = "SELECT ul_user_id, ul_nick, ul_region_id, up_user_id, up_instrument FROM prn_user_list, prn_user_profile WHERE (prn_user_list.ul_region_id='". $region ."') AND (prn_user_list.ul_user_id = prn_user_profile.up_user_id) AND (prn_user_profile.up_instrument = '". $instrument ."')"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo "User: ". $row['ul_nick'] ."<br />"; echo "Region: ". $row['ul_region_id'] ."<br /><br />"; } } ?> Tnx in advance!
  5. Sorry for double posting, browser bug. Delete one of them.
  6. Hi, mates! I'm having a headache since I tried messing up with mod_rewrite... The story follows: [*]Visitor types: http://abc.example.com [*]htaccess calls for http://example.com/profile.php?id=abc and displays abc's profile within abc virtual subdomain everything is cool and calm until I try to call any page from root: http://abc.example.com/page1.php The page doesn't show, neither displays any error. It just returns to the previous page with the same content as before opening page1.php from root. At the moment, I use the following .htaccess code: Options +FollowSymlinks RewriteEngine on # as I hate www, I hide it with this: RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteCond %{HTTP_HOST} !^(www\.)?distorzija\.com$ [NC] RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.distorzija\.com$ [NC] RewriteCond %{DOCUMENT_ROOT}/%2%{REQUEST_URI}/ -d RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L] # with this I call for user ID and display the content via profile.php RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{HTTP_HOST} !^(www\.)?distorzija\.com$ [NC] RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.distorzija\.com$ [NC] RewriteRule ^(.*)$ /profile.php?username=%2 [QSA,L] ErrorDocument 404 /404.php The point of my agony is: i need to keep the url (abc.example.com) even when opening files from root... Hope I explained the issue understandable... Tnx in advance! Nix
  7. Hi, mates! I'm having a headache since I tried messing up with mod_rewrite... The story follows: [*]Visitor types: http://abc.example.com [*]htaccess calls for http://example.com/profile.php?id=abc and displays abc's profile within abc virtual subdomain everything is cool and calm until I try to call any page from root: http://abc.example.com/page1.php The page doesn't show, neither displays any error. It just returns to the previous page with the same content as before opening page1.php from root. At the moment, I use the following .htaccess code: Options +FollowSymlinks RewriteEngine on # as I hate www, I hide it with this: RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteCond %{HTTP_HOST} !^(www\.)?distorzija\.com$ [NC] RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.distorzija\.com$ [NC] RewriteCond %{DOCUMENT_ROOT}/%2%{REQUEST_URI}/ -d RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L] # with this I call for user ID and display the content via profile.php RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{HTTP_HOST} !^(www\.)?distorzija\.com$ [NC] RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.distorzija\.com$ [NC] RewriteRule ^(.*)$ /profile.php?username=%2 [QSA,L] ErrorDocument 404 /404.php The point of my agony is: i need to keep the url (abc.example.com) even when opening files from root... Hope I explained the issue understandable... Tnx in advance! Nix
  8. Place the following code before anything in page: <?php ob_start(); ?> and the following at the end: <?php ob_end_flush(); ?>
  9. No worries! Glad that helped Cheers!
  10. Not sure I got your point, but try with this: <?php $referer = preg_replace("/(http:\/\/(.*)\/)[\S]*/", "\\1", $_SERVER['HTTP_REFERER']); $name = preg_replace("/http:\/\//", "", $referer); echo $name; ?>
  11. You should use utf8_unicode_ci as charset for any table in order to use Cyrillic characters... Also, be sure you've placed this meta in r document: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> Or, if even then fails, try defining the charset for use with queries: $query = "SELECT something FROM somewhere WHERE id = 1"; mysql_query("SET CHARACTER SET utf8"); mysql_query("SET NAMES utf8"); $result = mysql_query($query) or die(mysql_error()); cheers!
  12. @d_barszczak, how did you managed it? ???
×
×
  • 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.