-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
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)
-
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)
-
Using HTML, PHP & MySQL whats the actual php problem ?
-
update multiple checkboxes? DELETE and INSERT INTO?
MadTechie replied to jarv's topic in PHP Coding Help
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.'"/>'; -
update multiple checkboxes? DELETE and INSERT INTO?
MadTechie replied to jarv's topic in PHP Coding Help
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.'"/>'; -
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
-
jus above the this code // create thumbnail/ $thumbnailPath = md5(rand() * time()) . ".$ext"; $result = createThumb...etc
-
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)
-
erm.. thats a Smarty problem, your need to post that problem in the Third Party Section
-
can you post some sample data deom the database
-
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";
-
yeah regular expressions can be a pain but also fun.. but when you start you try to use them for everything lol..
-
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"); } ?>
-
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
-
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 ?
-
also you may want to update your regex's by replacing the / tags with % ie $suche = array('%[b](.+?)[/b]%i', //etc etc etc
-
erm.. LOWER does exist! try this.. <?php $username = "RyAn"; $sql = "SELECT username, pwd FROM users WHERE LOWER(username) = LOWER('$username')"; $username = $row['username']; ?>
-
read here Daniel php security page
-
change $publsher = $publisher; to $publsher = $companyname;
-
[SOLVED] Dreamweaver login server behavior - variable in login
MadTechie replied to damianjames's topic in PHP Coding Help
Yay.. its getting late and i am drained but wanted to end this thread lol.. can you click the topic solved button please -
welcome, can you click topic solved (bottom left).. saves other reading the whole post hoping to help
-
try this <?php $dir = "path/to/folder"; if( !(file_exists($dir) && is_dir($dir)) ) { mkdir($dir, 0700); } ?> PS file_exists check files and folders
-
can you please post the form
-
<?php $mystring = 'hello (world) how are (you today)'; $pos = strrpos($mystring, '(')-1; if($pos > 0) { $mystring = substr($mystring, 0, $pos); } echo $mystring; ?>
-
[SOLVED] Dreamweaver login server behavior - variable in login
MadTechie replied to damianjames's topic in PHP Coding Help
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";