Jump to content

darkcarnival

Members
  • Posts

    162
  • Joined

  • Last visited

Everything posted by darkcarnival

  1. thanks i setup php differently in apache than what you listed btw i did it the cgi way, i believe thats what its called. calling php.exe which in php 5 i learned was renamed to php-cgi.exe thank you for the help.
  2. hi, i plan to upgrade my test server from 4.3.9 to 5.1.4 now i did try to use php 5 before but i wnen t back to php 4 after i seen mysql had to aded in as a mod, now is that still needed? and if so how do i set that up? thanks.
  3. well i want to have wildcard matches so that if someone tries to do: site_admin would get blocked. but ok I'll try your way on this.
  4. hello, i made a function for my membership form to block certain usernames from being used but for some reason when i add more than 1 value in there, it seems to automatically kill the registration process stating the name used is banned when it isnt. below is the code im using, [code]function blacklisted_usernames(){ global $username, $txt; $sql = "SELECT * FROM ebb_blacklist"; $errorq = $sql; $blacklist_q = mysql_query($sql) or die(error($error, "mysql", $errorq)); $numchk_user = mysql_num_rows($blacklist_q); if($numchk_user == 0){ //bypass this check, nothing is found to check. }else{ while ($row = mysql_fetch_assoc ($blacklist_q)){ if($numchk_user == 1){ $banlist_user = "/$row[blacklisted_username]/"; }else{ $banlist_user = "/"; $banlist_user .= "$row[blacklisted_username]|"; $banlist_user .="/"; } if($row['match_type'] == "Wildcard"){ if (preg_match($banlist_user, $username)){ $error = $txt['usernameblacklisted']; echo error($error, "general"); } }else{ if ($username == $row['blacklisted_username']){ $error = $txt['usernameblacklisted']; echo error($error, "general"); } } } } }[/code] thanks.
  5. a huge thing to know first. be sure to clean the varible first to ensure no one enters an invalid entry. the way listed above will cause you to get attacked in a snap. though another simple method is to draw out the data from mysql. if you want more info on this, just ask.
  6. i dont want to add a password to it since im doing that now and i get alot of people bitching about it ;) when not showing the real location mean like doing: download.php?id=2 i might go ahead and do that.
  7. hello, I'm helping a fellow script site with their downloads by providing a alt link(since he gets so many hits and all) and I want to be able to add some security to the download system i have for this. basically i have done some reading and ive seen many do some with http_referer to prevent a bandwidth attack, but I do not know how to do such a thing. first off is this possible with php itself or do i need to alter something in apache to work along with this? any help at all is fine :) thanks.
  8. found the problem, its the anti-injection function i found on this site, if i see the author's email on their profile i might let them know about this problem. for now I plan to do some research on a replacement to this injection function any suggestions are fully welcomed :)
  9. here is the query: [code]"SELECT * FROM ebb_users WHERE Username='$logged_user'"[/code] $logged_user is either $_COOKIE or $_SESSION(depends on what type of login the user chooses). the anti_injection script can be found on the code library from this site ;)
  10. hello, a script of mine that has a login area doesnt seem to like usernames that have or in the name. like if a user uses toro or coreuser will not let a user log in correctly displaying errors evetywhere. now my query is simple, the anti-injection function im using i disabled but still seems to cause problems. if you want to see anything that could help you help me, just let me know and I'll provide it for you. thanks.
  11. ok i figued this out :) took some work but i found a way to make the ordering system automated. thanks to those who replied.
  12. well really what I wanted to do is something like this: category name [txtbox to enter number] and but i have not found any kind of help on doing that sadly. but what if order is a number you either add to or subtract from a certain number. like to go up add by 7 and when to go down substract by 3 or something like that. it would have to be a way that the numbers would never match up.
  13. not sure how to word this but basically Im working on a way to automate the way I order up the categories for a script of mine. the way its written now is that i punch in the number and have to do edit a few items beefore it actually moves up. now what i want to do is make a link that will either move the item up or down(depending on what link is clicked) and when the link is clicked the item will move up or down. basically how you move the forums & catories in phpbb. you click on move up and the item moves up. any idea on how to do that? thanks :)
  14. no i ment each folder would be a category, the name of the folder is what that category would be called. like if i named it funny dogs, that would appear as a cateogry but clicking on would tell the gallery to look in the funny dog folder, get what im saying now?
  15. what i mean is, hers aan example: .folder1 ..sub-folder1 ...sub-folder2 ....sub-folder3 now the sub folders iwant to be categories in the gallery script, but how do i replacre those dots to be an actual folder name that will be of use for me. cause just calling to view a folder will just display the dots which doesnt do me any good.
  16. ok i see your point ;) my question i guess was more or less on how to find the folders than how to loop it all. i mean i tried to do this but i only see a bunch of dots. any idea on how to get the folders in a folder would make my day :)
  17. hi, I want to improve a gallery script i have and what i want to do is have each folder be its own category, but how do i do that? thanks :)
  18. yep i noticed that too later on :oops:, thanks guys its now working :)
  19. yes it does. btw the first col is the id which i set to auto incredment. how about if i list the query that creates the new table: [code]CREATE TABLE `ebb_groups` (   `id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,   `Name` varchar(30) NOT NULL default '',   `Description` tinytext NOT NULL,   `Leader` varchar(25) NOT NULL default '',   `Enrollment` tinyint(1) NOT NULL default '0',   `Level` tinyint(1) NOT NULL default '0',   PRIMARY KEY  (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1[/code] if there is anything wrong there, please let me know. edit: I got it to work, dont ask i just reworded the query and it worked.
  20. hi, I'm working on a install program for a program of mine and for some odd reason it will display this error when it tries to insert data into a newly made table. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Could not add data. Column count doesn't match value count at row 1[/quote] now here is the sql code I'm using: [code]mysql_query("INSERT INTO ebb_groups VALUES('1', 'Administrator', 'These are the people who are in charge. They have full power over the board.', '$user' '1', '1')") or die("Could not add data.<br>". mysql_error());[/code] I am just stumped as to why this wont work, i mean i got this code right from phpmyadmin. any help on this would really be great :) thanks
  21. ok well i have another idea for ya. i did this for a install script i made. basically a variable that would be set to ture all the time. then check for that variable. heres an eamxple of what i mean. if($name !== ""){ $name_r = true; } if ($age !== ""){ $age_r = true; } then check for those variables like so: if (($name_r == true) and ($age_r == true)){ //go further in script } give that a try.
  22. thats great to hear :D thanks.
  23. [code]if (($first) AND ($last) AND ($gun) AND ($age) AND ($saying) AND ($email) AND ($phone) AND ($users) AND ($passs)) { $host = "localhost"; $user = "--"; $pass = "--"; $db = "mattswebpage_com_-_web"; $connection = mysql_connect($host,$user,$pass) or die ("Unable to connect!"); mysql_select_db($db) or die ("Unable to select database!"); $query = "INSERT INTO members VALUES ('$first','$last','$gun','$age','$saying','$email','$phone','$users','$passs')"; mysql_query($query); }[/code] try that ;)
  24. hi, probabley a dumb question but I'm curious about this. i have a template class created and its pretty good though it has one limitation, loops. it doesnt work well at all with loops. my solution place the loops in a function and call them in the template, it works. but it seems to kill off the customablity a bit which is where this question comes in. is there a way to draw out the variables made by the loop by plaxcing them into an array? hard to phrase this so i'll write out an example of what i mean: [code] function loop_thing(){ //sql query stuff here while($row = mysql_fetch_assoc($sql_r)){ $results = array($row['colume1'], $row['Colume2'], $row['colume3']); } return $results; } //then to output: $results = loop_thing(); echo $result[0]. "<br>"; echo $result[1]. "<br>"; echo $result[2];[/code] would something like that work? thanks.
×
×
  • 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.