-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
Pagination doesn't display the results - Huge problem..
MadTechie replied to Irresistable's topic in PHP Coding Help
You know that example cleared up most of what I wanted to know.. But Seriously do you think I am going to help now ? -
I foresee problems!
-
Pagination doesn't display the results - Huge problem..
MadTechie replied to Irresistable's topic in PHP Coding Help
I'll be honest, I looked at this thread ans skipped it, as there's not really any detail to work with, if you wrote the classes then your know have an idea of where the problem is, if you didn't then any helper would need to dig thought the classes and ask for every little detail, also i don't see a clearly stated problem (ie what your getting / expecting) -
[SOLVED] Reset a variable during a while loop
MadTechie replied to dub_beat's topic in PHP Coding Help
It would seam that $value is infact an array, do a vardump($value); and see if you can find the data you want and post the results back here (with the info about the expected results) -
You are placing EVERY number from 0 to 60.. so the results your getting are correct.. also $i should be 0 I think you want to limit your replacement, ie every quoted number ie "0" That's just an example
-
C. try re-installing the internet (just an idea) also a joke!
-
[SOLVED] Reset a variable during a while loop
MadTechie replied to dub_beat's topic in PHP Coding Help
Something like if($value[0]==$subid && $issubcatticked == false){ -
This dirname(__FILE__) will return the absolute path to the current file. so IN the controllers, you would have include dirname(__FILE__).'/../scripts/utilities.php'; and IN the gateway, you would have include dirname(__FILE__).'/scripts/utilities.php';
-
Okay well that should be fine, of course assuming the case is the same, it maybe worth connecting via FTP and checking the permission and file size, while your their upload another font, ie arial.ttf into the captcha folder, then (if no changes were made to the gentium fonts) update captcha.php from $this->fonts = array( dirname(__FILE__) . '/gentium/GenAI102.TTF', dirname(__FILE__) . '/gentium/GenAR102.TTF', dirname(__FILE__) . '/gentium/GenI102.TTF', dirname(__FILE__) . '/gentium/GenR102.TTF'); to $this->fonts = array( dirname(__FILE__) . '/arial.ttf'); assuming that works, you can repeat the test with each font, $this->fonts = array( dirname(__FILE__) . '/gentium/GenAI102.TTF'); then $this->fonts = array( dirname(__FILE__) . '/gentium/GenAR102.TTF'); etc etc
-
do you have the other 3 files ? GenAR102.TTF GenI102.TTF GenR102.TTF
-
I knew someone would say it!
-
okay, the folder that captcha.php is in, you should have another folder called 'gentium' inside that you should have the following fonts GenAI102.TTF GenAR102.TTF GenI102.TTF GenR102.TTF' on unix this is case sensitive So for example this path should be valid /home/xxx/public_html/wp-content/plugins/mm-forms/captcha/gentium/GenAI102.TTF
-
Here some choice from the manual imagecreatefromgif imagecopymerge imagettftext imagepng And here a basic sample <?php // Create image instances $dest = imagecreatefrompng('background.png'); $src = imagecreatefrompng('sprite.png'); // The text to draw $text = 'Testing...'; // Replace path by your own font path $font = 'arial.ttf'; //colour $black = imagecolorallocate($dest, 0, 0, 0); // Add the text imagettftext($src, 20, 0, 10, 20, $black, $font, $text); // Copy and merge imagecopymerge($dest, $src, 10, 10, 0, 0, 100, 47, 75); imagepng($dest,"newimage.png"); imagedestroy($dest); imagedestroy($src); ?> Hope that helps
-
Well i did suggest it a few posts back but i didn't have the iframe details I'm glade it works
-
the font used in imagettftext can't be found or doesn't exists, goto line 60 of captcha.php and check the 7th parameter to check the name (it maybe missing .ttf), or update to another font
-
I think that was an old rule as you can,
-
1. don't label as urgent, unless its in the freelance section 2. use code tags 3. "not working" and "not working properly" isn't much help..
-
Humm, its kinda hard to follow with so many queries however if you pass the id, logically it should work <iframe width="237" height="270" src="userapplet.php?morelikethis=<?php echo "".$m['musicartist'].""; ?>" name="morelikethis" border="0" frameborder="0"></iframe></div></td> become <iframe width="237" height="270" src="userapplet.php?morelikethis=<?php echo $m['musicartist']."&mid=".$name; ?>" name="morelikethis" border="0" frameborder="0"></iframe></div></td> $name2 = mysql_real_escape_string($_GET['morelikethis']); $sql = sprintf("SELECT * FROM music WHERE musicartist LIKE '%s%%' AND musicartist !='%s' ORDER BY `musicartist` ASC LIMIT 0,6",$name2, $name2); $s = mysql_query($sql) or die(mysql_error()); becomes $name2 = mysql_real_escape_string($_GET['morelikethis']); $mid = (int)$_GET['mid']; $sql = sprintf("SELECT * FROM music WHERE musicartist LIKE '%s%%' AND musicid !=%d ORDER BY `musicartist` ASC LIMIT 0,6",$name2, $mid); $s = mysql_query($sql) or die(mysql_error());
-
I can't see the problem in the code or on the site, please explain it again!
-
I think it would be worth seeing the whole code, but i'll look at it in the morning its 4am here.
-
Is that query ran via ajax ? if so does it pass the v parameter as it would seam that v isn't being passed. Personally i like to pass ID's but this would also work $sql = sprintf("SELECT * FROM music WHERE musicartist LIKE '%s%%' AND musicartist !='%s' ORDER BY `musicartist` ASC LIMIT 0,6",$name2, $name2);
-
If its changing then its likely it uses the logic i stated in my last post.. the XML is updating a counter of time passed since last active
-
same logic, just replace $box = imageTTFbbox ( $fontsize, 2, $font, $text ); with a function that breaks the string up into letters then runs a loop using something close to my last post
-
I'm an idiot %%s% should be %s%% EDIT: removed a '
-
Oh pants, update to this $sql = sprintf("SELECT * FROM music WHERE musicartist LIKE '%%s%' AND musicid !=%d ORDER BY `musicartist` ASC LIMIT 0,6",$name2, $_GET['v']); $s = mysql_query($sql) or die(mysql_error()); i didn't notice you had used mysql_real_escape_string already