Jump to content

HuggieBear

Members
  • Posts

    1,899
  • Joined

  • Last visited

Everything posted by HuggieBear

  1. I love a good Monkey Wrench every now and again :) Huggie
  2. Two things... 1. Ted, the http authentication that Mal is using is the same thing as .htaccess, but he's using the header() function in PHP to present it on a per page basis as opposed to a per directory basis.  It just uses the same WWW-Authenticate: Basic (depending on how you have .htaccess setup) 2. Mal, Are you sure your friend has it setup this way?  As far as I was aware, you could log in using that pop-up box that gets presented in the browser and then pass these values to php, but not the other way around. Regards Huggie
  3. It should be... [code=php:0]if ($key != 'username'){[/code] Not ... [code=php:0]if (!$key == 'username'){[/code] Regards Huggie
  4. I've used the GD library for a few things, yes. You're after [url=http://uk.php.net/manual/en/function.imagecopyresampled.php]imagecopyresampled()[/url] Although the description of this is [i]"Copy and resize [b]part[/b] of an image with resampling"[/i] you can provide the coordinates of the whole image. There's also a very simple example in the manual on the page I've provided. Regards Huggie
  5. This is the best way to do what you're after... [code]<?php $inter = "SELECT DISTINCT model FROM $get2"; $id_rez = mysql_query($inter); while ($rand = mysql_fetch_array($id_rez, MYSQL_ASSOC)){   echo "<option>".$rand['model']."</option>"; } ?>[/code] Regards Huggie
  6. The reason this is occurring is because the images aren't being resized at all, they're just scaling down the proportions and displaying it... If you right click the picture to see where it's being hosted and then open that location in a new window, you'll see the file hasn't been resized at all.  Look here: http://lawtonfoley.ie/admin/carimages/1769742953/DSCF1001.JPG You could use the GD library to resize and maintain quality, but you'd need to integrate the code with what you already have. Regards Huggie
  7. Exactly like that :) Huggie
  8. You've way over complicated things here.  Try this: [code]<?php // Assign values to array $one = array(1,2,3,4,3,6,1,3,2); // Create an array of unique values from $one $two = array_unique($one); // Output as proof echo "<pre>\n"; print_r($two); echo "</pre>\n"; ?>[/code] Regards Huggie
  9. Shoz, Am I meant to be running [color=blue]make[/color] from inside /php-5.0.4 or from inside /php-5.0.4/ext/gd and should I be running [color=blue]make install[/color] after it Huggie
  10. Shoz, Up until 6 was excellent, but there is no Makefile.  I've tried copying Makefile.global to Makefile and this doesn't make anything! Any ideas? Huggie
  11. OK, I'll see if I can come up with a function, give me an hour... Huggie
  12. What format is your dob column in your database? Regatds Huggie
  13. I think you can probably try and define a DOCUMENT_ROOT. Try doing a search on these forums for further information. Regards Huggie
  14. I'm pretty certain you can't... On a DATETIME type filed you could use [color=blue]WHERE column_name > '$min' AND column_name < '$max'[/color] Huggie
  15. [quote author=genericnumber1 link=topic=121759.msg501186#msg501186 date=1168423589] you know you can query a range of dates... something like SELECT * FROM Users WHERE dob BETWEEN '1/1/2006' AND '1/1/2007' [/quote] Can you use BETWEEN in MySQL?  I didn't realise you could?  I know it's available in Oracle Regards Huggie
  16. No, it's not looking right today.  Also notice that the header file has changed, it's now showing the SMF logo up at the top right hand side of the screen. Maybe we've been trough an upgrade of some kind? Regards Huggie
  17. OK, first of all don't nest your functions, it not only makes it harder to read, but also harder to debug...  Below is a generic example of a while loop as opposed to a foreach loop... [code]<?php // Specify the query and run it against the database $sql = "SELECT * FROM item_possesion WHERE userid = '$userid'"; $result = mysql_query($sql) or die("Can't run $sql:<br><br>\n" . mysql_error()); // Loop through the results while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){   // Your code goes here } ?>[/code] As for how to integrate the code you already have, I'd say scrap the three queries you have and use joins to get your result set in one hit.  If you're not sure about this then google the term "sql join".  It will make working with your results easier and place less overhead on your server. Regards Huggie
  18. Shoz, that's perfect, I'll see what I can do. Regards Huggie
  19. Thanks Thorpe, but that's no good.  I need the .so pre-compiled on a SPARC Solaris 10 machine for me, as my Unix Administrator won't recompile php after the problems we had last time with it. I'm going to attempt to install a separate instance of php on the box, compile it and then copy the .so over, but wondered if anyone else had one first. Regards Huggie
  20. You want JavaScript as stated by Jesi, this is very simple to do once you've created the calendar, a google search will almost certainly yield the results you're after. Regards Huggie
  21. No problem! It might not work, but I'm pretty sure it does.  It doesn't work the other way around, you can't login to a php site and set the values of those $_SERVER variables. Regards Huggie
  22. Yes, you're underestimating how much memory it uses...  Increase the memory to something like 50MB using ini_set() as suggested by Jesi. Take a look [url=http://www.libgd.org/FAQ_PHP#Why_does_gd_cause_my_PHP_script_to_run_out_of_memory.3F]here[/url] [code]<?php // Increase available memory ini_set("memory_limit","50M"); ?>[/code] Regards Huggie
  23. That's weird, and incidentally, I don't think that getimagesize() is part of the GD library from what I remember. Regards Huggie
  24. [quote author=ToonMariner link=topic=121662.msg500674#msg500674 date=1168360549] tinyMCE is IMO option the most customizeable wysiwyg editor - only draw back is that they ahev made it 'cross browser' friendly by including if staements every where instead of compartmentalizing the code into direcotries and just using the one set of code for each browser. This makes it quite big and hence slows down your page. If that is an issue then perhaps look at FCKEditor - similar vein but I personally prefer tiny. [/quote] You can use the TinyMCE PHP compressor... [quote author=TinyMCE] Serverside GZip compresses TinyMCE to reduce overall download size. Makes TinyMCE 75% smaller and a lot faster to load.[/quote] Regards Huggie
  25. Create a page called edit.php or something similar and use something like [url=http://tinymce.moxiecode.com/]TinyMCE[/url] on that page. Then all you have to do is pass the page some user unique parameters and away you go. Regards Huggie
×
×
  • 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.