Jump to content

gtridez

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gtridez's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i've had a problem with hackers finding my password when its in a public directory
  2. Hey, For security purposes i need to place the username and password for my mysql database somewhere where they can't be found... i've tried placing them above the root directory but not all hosts allow this so i get a "open_basedir restriction in effect" message. i've read in the o'reilly php cookbook that setting them as environment variables is one of the best way to go... but i'm on a shared server so i dont have access to the httpd.conf file to do this... does anyone know what i could do?
  3. well for security purposes i need to place the username and password for my mysql database somewhere where they can't be found... i've tried placing them above the root directory but not all hosts allow this so i get a "open_basedir restriction in effect" message. i've read in the o'reilly php cookbook that setting them as environment variables is one of the best way to go... does anyone know what i could do?
  4. i have a very basic question... i'm hosting with a host provider that has my website on a shared server... is it possible that i can access my httpd.conf file and if so how? because i need to add server env's for database password and username... anyone could help me here?
  5. hey... thanks... after further research after i made this post i realised that i need to make my images and stylesheets relative to my site root. something i had over looked in my web development practices...sadly.. basically makin graphics/thisimage.jpg to /graphics/thisimage.jpg to anyone having this same issue.
  6. hey...i'm doing a mod rewrite for a client site and i'm trying to rewrite this url --> http://guyanayellowpages.gy/categories.php?cat=Accommodation to --> http://guyanayellowpages.gy/categories/Accommodation the mod rewrite code i'm using is this -- > Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule ^categories/([^/]*)$ /subCategories.php?cat=$1 [L] however if you click on the link http://guyanayellowpages.gy/categories/Accommodation you will see that i have a problem when it comes to image and style sheet files loading... any help on how to fix this would be appreciated.
  7. hey never mind guys ...i figured it out... i stripped both of the values to lowercase using strtolower before comparing them... [code] $value1 = strtolower($originaltext); $value2 = strtolower($dbtext); [/code]
  8. hey... i'm tryin to query something in a mysql table ... i'm searchin a table to find a username where the user name is "Myuser" ...ie the first letter is upper case It only returns a result if i type "Myuser" in the form and not "myuser" ... the colation of the field is latin1_swedish_ci the code is as below... any help will be greatly appreciated...thanx [code]include("includes/connect_gtriderz.php"); $sql = "SELECT * FROM members WHERE username='$username'"; $query = mysql_query($sql); while ($row = mysql_fetch_array($query)) { $dbUser = $row['username']; if($dbUser == $username) { $errmsg = "We're sorry but the username <b><i>$username</i></b> already exists, please use another one ..."; $error = "yes"; $username = ''; } } include("includes/closeDb.php");[/code]
  9. thanx...anywhere i can get a little more info on that?
  10. hey guys... i need to allow only certain html tags when a user submits info in a form... for example like only allow <b>, <img src".."> tags etc.... i'm familiar with strip_tags function...but any way to do what i want?
  11. Hey guys...i'm wondering if anyone knows how to have multiple WHERE conditions... example --> SELECT * FROM table [b]WHERE rid=$ride && uid=$userid && accepted='0'[/b] I need help selecting rows where all three of the conditions above are met...anyone knows how to do this? any help will be greatly appreciate... thanx
  12. [!--quoteo(post=377271:date=May 26 2006, 06:44 AM:name=burhankhan)--][div class=\'quotetop\']QUOTE(burhankhan @ May 26 2006, 06:44 AM) [snapback]377271[/snapback][/div][div class=\'quotemain\'][!--quotec--] user appache mod_rewrite module..... create an .htaccess file at your root directory, and put this code in it: [code]RewriteEngine on RewriteRule ^user$ userProfile.php [NC,L][/code] [/quote] hey..thanx... yes i was informed to use the mod_rewrite rule and i have already found a solution....similar to yours...thanks alot tho!
  13. Hey, I would like to know if anyone knows how to make a non-existent directory redirectoy redirect to ...lets say a profile... for example like how it is done on myspace.com ....where they hape [a href=\"http://www.myspace.com/user\" target=\"_blank\"]http://www.myspace.com/user[/a] and that then redirects to the users profile... any help would be greatly appreciated... thanks alot
  14. [!--quoteo(post=373798:date=May 14 2006, 01:51 PM:name=toplay)--][div class=\'quotetop\']QUOTE(toplay @ May 14 2006, 01:51 PM) [snapback]373798[/snapback][/div][div class=\'quotemain\'][!--quotec--] You probably have a syntax error in your SQL and you're not checking for errors before doing the fetch. Click on the [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=31047&view=findpost&p=153359\" target=\"_blank\"]PHP F.A.Q.[/a] link. Find and read the [b]MySQL Data Retrieval[/b] section for example code of getting data from MySQL with error checking after every MySQL command. Also search that topic for "supplied argument is not a valid" for more info. Please be careful not to double post. I delete your other duplicate post. EDIT: I see you posted the SQL. Put quotes around the $unid value. "WHERE unique_image_id = '$unid'"; [/quote] heyyy... thanx alooot man... damn i don't know how come i didnt tink of something so simple... it works fine now and my problem is solved... thanx a whole lot again and oh...sorry about the double post...first post had sum stuff i didnt want in my post....but wasnt sure how they got there...
×
×
  • 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.