Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. why not just store them outside the html_public folder.. scripts can still access them and you could use the force download script to download them.. (and add some extra security to them if needed)
  2. create a phpinfo page <?php phpinfo(); ?> open it and check the results, if you can't find curl then its not installed on the server which means you can't use CURL.. (many hosts disable/remove it)
  3. Using HTML, PHP & MySQL whats the actual php problem ?
  4. opps edited the last post and here it is again now change echo '<input name="keyword_id[]" type="checkbox" value="'.$Keyword.'"/>'; to echo '<input name="keyword_id[]" type="checkbox" value="'.$keyword_id.'"/>';
  5. its a test.. dose it work without error.. (i'll assume so) now change echo '<input name="keyword_id[]" type="checkbox" value="'.$Keyword.'"/>'; to echo '<input name="keyword_id[]" type="checkbox" value="'.$keyword_id.'"/>';
  6. Thanx fenway the DISTINCT & FIND_IN_SET() info was useful to me also, and i totally agree with the part about stroring lists in fields as i said
  7. jus above the this code // create thumbnail/ $thumbnailPath = md5(rand() * time()) . ".$ext"; $result = createThumb...etc
  8. well i normally i would create another table for consoles and link it in.. but you could do this SELECT video.id, games.id, video.groups,video.randname,games.consoles,video.timestamp FROM video, games WHERE video.groups LIKE "%12345%" AND CONCAT(',', games.consoles, ',') LIKE "%,4,%" GROUP BY video.id, games.id LIMIT 3 basically it changes "4,8,9" to ",4,8,9," then looks for [something],4,[something] this works better as [something]4[something] would find 4 or 40 or 14, and if we don't concat the comma's then 1,2,3,4 wouldn't work (no trailing comma)
  9. erm.. thats a Smarty problem, your need to post that problem in the Third Party Section
  10. can you post some sample data deom the database
  11. if you using the current date then you can get MySQL to do it for you.. using CURDATE() ie INSERT INTO table SET datefield = CURDATE() EDIT: Oh yeah and via PHP $date = date("Y-m-d"); $SQL = "INSERT INTO table SET datefield = $date";
  12. yeah regular expressions can be a pain but also fun.. but when you start you try to use them for everything lol..
  13. try this <?php $var = "this is my email: tester@testing.com "; if (preg_match('/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/si', $var)) { die("Contains an email"); } ?>
  14. okay.. try grouping SELECT video.id, games.id, video.groups,video.randname,games.consoles,video.timestamp FROM video, games WHERE video.groups LIKE "%12345%" AND games.consoles LIKE "%123%" GROUP BY video.id, games.id LIMIT 3
  15. okay, heres yours $suche = array('/[b](.+?)[/b]/i') now i know that you are using the i switch.. but the computer will think you switch is b]/i as you started with a / you must end with a / but your regex requires /, so you can do one of two things $suche = array('/[b](.+?)[//b]/i') //or $suche = array('%[b](.+?)[/b]%i') i find % easier but you can use almost anything ie $suche = array('~[b](.+?)[/b]~i') $suche = array('#[b](.+?)[/b]#i') $suche = array('@[b](.+?)[/b]@i') //etc make sense ?
  16. also you may want to update your regex's by replacing the / tags with % ie $suche = array('%[b](.+?)[/b]%i', //etc etc etc
  17. erm.. LOWER does exist! try this.. <?php $username = "RyAn"; $sql = "SELECT username, pwd FROM users WHERE LOWER(username) = LOWER('$username')"; $username = $row['username']; ?>
  18. read here Daniel php security page
  19. change $publsher = $publisher; to $publsher = $companyname;
  20. Yay.. its getting late and i am drained but wanted to end this thread lol.. can you click the topic solved button please
  21. welcome, can you click topic solved (bottom left).. saves other reading the whole post hoping to help
  22. try this <?php $dir = "path/to/folder"; if( !(file_exists($dir) && is_dir($dir)) ) { mkdir($dir, 0700); } ?> PS file_exists check files and folders
  23. can you please post the form
  24. <?php $mystring = 'hello (world) how are (you today)'; $pos = strrpos($mystring, '(')-1; if($pos > 0) { $mystring = substr($mystring, 0, $pos); } echo $mystring; ?>
  25. When you go to this page, do you have lang=somthing in ther url ? oow i just spotted something change $loginFormAction = $_SERVER['PHP_SELF']; to $loginFormAction = $_SERVER['PHP_SELF']."?lang=eng"; test then try $loginFormAction = $_SERVER['PHP_SELF']."?lang=$lang";
×
×
  • 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.