User Profile

Collapse

Profile Sidebar

Collapse
ronnil
ronnil
Last Activity: Jan 4 '08, 08:36 AM
Joined: Jun 1 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ronnil
    replied to can anyone give me idea of PHP framework?
    in PHP
    Hi kang jia

    I must agree that a framework is/should be optional. Having said that, I have just fallen hopelessly in love with CodeIgniter.
    It's easy to setup and takes about half a day to read the documentation and get an idea of the basics. It is also highly customizable if you know what you're doing.

    If you're new to PHP i will strongly recommend you to NOT using a framework, since you have a lot of basics to...
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to Regular Expression Problem
    in PHP
    There's a problem though.... passing 01-02-2007, there's no way of telling if the user meant 1st of February or 2nd of January. It's mostly a problem on international sites i guess. Personally i write how the user should input the date, and trust they are not complete morons (i ofc check that it is a valid date of some sort)...
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to Generating a PDF file in PHP
    in PHP
    Hi Rob

    I don't know what your exact intent is with the PDF, but sounds to me like it's just for making the printing possible.
    Might i suggest you putting this into html instead and with a simple javascript you can print out the page.
    This takes a lot off of your hands trying to produce PDF, and you can maybe concentrate on making the other things possible.
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to How to store image in 300 dpi using php
    in PHP
    Hi Eric

    If your picture is 300dpi, I'd suppose saving the picture will still produce a 300 dpi picture unless you alter the size of the picture.

    I would advise you not to use a php-method to toy around with images used for printing (if that is your objective). In this case i think Java would be better (don't know how much better tho)

    I found this topic discussing the same subject, you might wanna check...
    See more | Go to post

    Leave a comment:


  • I figured it out :)

    Problem is that user rights don't function correctly on fat32 partitions, and in my case it was mounted without rights to others

    i changed the umask in /etc/fstab to be the correct and i was afterwards able to view the page correctly :)
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to NULL password in UNIX
    Why do you want to allow users giving no password? Isn't that a major security hole?
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to Download files without <a>
    in PHP
    heh.. forgot to say

    You link to this file, either with onclick or with <a href=""></a>, either way you put the file id in the query like http://yoursite.com/path/to/download.php?fi d=3245

    and then you should get a download query
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to Download files without <a>
    in PHP
    Hi nathj

    The answer is in fact painfully simple. What you need is headers (I don't remember your other posts so I don't know how much you have messed with this)

    this should get you going (hopefully)

    this file we call "download.p hp"
    [CODE=php]
    <?php
    /*
    We'll pretend that info about the file is stored in the table "file_table ", here we need at least to store...
    See more | Go to post
    Last edited by ronnil; Sep 5 '07, 04:24 PM. Reason: Syntax error in php example... doh!

    Leave a comment:


  • A file permission problem: Allow apache to use a webroot on mounted device

    Hi

    First of all, let me say that I'm fairly new to Linux.

    My problem is that I'm not entirely able to uninstall windows partially because I need to debug webpages in MSIE. So what i would like to do is have a wwwroot on a device readable by both windows and linux, for this i use a fat32 partition.

    I've managed to set virtual hosts up on linux with apache, but so far only in the /home directory. What i...
    See more | Go to post

  • ronnil
    replied to apache/mysql/php package
    If you just want it working this might help

    http://www.newlinuxuser.com/beginner...hp5-and-mysql/...
    See more | Go to post

    Leave a comment:


  • The best way to solve this is by using javascript

    you can either allow the user to input a date string and parse it with regexp like mm-dd-yyyy (the validation can be done with either javascript or PHP)

    OR

    you can make selectboxes for date, month, year (and hour&minute if you want)

    according to which year & month is selected, theres 28,29,30 or 31 dates to choose from.
    ...
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to Best way to call an object method
    in PHP
    I'm with you that far pbmods :)

    In this particular case I have in my mind, the object is in fact instantiated, so when this is the case, is there a speed/memory increase to gain using one method over the other?

    take this example

    [CODE=php]
    <?php
    class MyClass
    {
    function my_static_funct ion()
    {
    echo "This function is static";
    ...
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to two actions on single form submit
    in PHP
    it is actually possible to send post data from php. saw an example a couple of days ago... should have bookmarked it (damnit!) but i believe it was hidden in some library in the php manual link

    This is definately the way, unless you want to use ajax and then post to your own site upon submit
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to Best way to call an object method
    in PHP
    ooops posted in articles section, please move it to questions :S
    See more | Go to post

    Leave a comment:


  • ronnil
    started a topic Best way to call an object method
    in PHP

    Best way to call an object method

    Hi

    I'm sitting here making a method in a object. The method doesn't really require instatiation of the object, and then i started wondering.... is this correct, and what is the best way to call this method?

    meaning:
    This method could actually be a global function (what it does can be used in other conjuctions) but I'm not really planning to use the function in other context than the specific object.
    ...
    See more | Go to post

  • ronnil
    replied to GD library for WAMP 1.6.6
    in PHP
    Have you instantiated $graph? since you get "false" when using get_class($grap h), this means $graph is not an object at all.
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to Dynamic Conditions/Criteria in PHP form
    in PHP
    @BigM again :)

    you need to put your formfields inside the form tag, also if you wrap a div or table tag around them, if you don't, nothing will get send with the form :)

    and make sure to set the method attribute too, cause the GET method might not always be the browser default :)
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to Dynamic Conditions/Criteria in PHP form
    in PHP
    Hi BigM

    Taking the code you posted above, you see you named your textfield "criteria[]"

    as you know the field's values can normally be collected with $_POST or $_GET. This is actually still the case, the only thing is that when you put in the square brackets, your result will be an array :)

    if you wanted to gather all the inputfields you would use something like

    [CODE=php]
    ...
    See more | Go to post

    Leave a comment:


  • ronnil
    replied to How to store Image into databse
    in PHP
    Personally i don't think it's such a bad idea, as long as your site isn't visited as much. The reason it's a bad idea is that it's a really slow process reading so much data from a database.
    BUT for security reasons, this could very well be a good idea since the only way you can access the pictures, is through a server side language.

    If possible, it's better to store images and files over you webroot, and then access them stil...
    See more | Go to post

    Leave a comment:


  • Yep that is infact a pretty good solution. Haven't needed this type of thing for an instant messenger or anything, but when i do.... hope you don't mind me borrowing your idea ;)...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...