• Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Php coding doubt

    Honestly, you've developed a bad coding habit already. I am not trying to be negative here, but the way I see it, you will have a hard time correcting them. …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Login not working

    I thought this $HTTP_SESSION_VARS has been [deprecated ](http://php.net/manual/en/reserved.variables.session.php)100 years ago? I might be wrong.
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Are there any advantages in using ASP.net over PHP?

    ASP.net is a development framework which allows you to use either C sharp or VB.NET language. There is also a new release called ASP.net 5 that supports angularJS, GruntJs, and …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Database insert query not working

    try including your connection.php after you include the header.php. Include it above all, when header.php is also needing the connection. In your case the $connection is a variable, and one …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in replace word in string with matching key=>value in assoc array

    this will also work as an alternative to str_replace $string = trim($string,'(())');
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Trying to get non-object error ?

    okay, I double checked [here](http://php.net/manual/en/mysqli.affected-rows.php) and I was wrong, affected_rows can be use either update, insert, and select queries. so if you defined $conn like this $conn = new mysqli("localhost", …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Trying to get non-object error ?

    $result->num_rows is a method for select query, while $conn->affected_rows; is for the affected rows after executing an insert query. That's what I think. I might be wrong ????
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in php pigmy requests guidance

    you can try creating functions that will sequentially handle the steps. example, function firstStep() { /* create database here */ /* if database has been created */ /* return true; …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in FetchAll vs while loop

    It's a matter of preference. However, regardless of what you use, you still have to loop through the result. There is not much difference between while loop and foreach loop. …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in not sending value into the database

    if you are confident with you codes, then just leave it like that and wait for someone to help you maybe they can do better.. :). Just my humble opinion.
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Tweeted not sending value into the database

    Hello, I created a query insert query everything is in right order but dont know whyy its not working function submit_report() { global $connection; if(isset($_POST["submit"])) { $id = 215; $name …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in not sending value into the database

    you should add return true; somewhere in your confirm_query() function, preferrably after the die() function and then you can evaluate like this if(confirm_query($insert_query)){ /* you won't pass this point if …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in getting css codes of a web page with php

    I forgot to give you the download [link](http://sourceforge.net/projects/simplehtmldom/). Also, I would like to remind you about the security implications of file_get_contents as described in the [php security consortium](http://phpsec.org/projects/phpsecinfo/tests/allow_url_fopen.html). So, instead …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in getting css codes of a web page with php

    another option that will give you a total control is [php html DOM parser API](http://simplehtmldom.sourceforge.net/manual_api.htm). for example, $scrape = file_get_html('somesite_to_scrape.com'); /* get the css line */ foreach($scrape->find('link.href') as $css_file){ /* …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Form Validation Frustration

    try, public function add_email() { /* set errors var as array */ $errors = array(); $this->load->library('form_validation'); $this->form_validation->set_rules('name', 'Name', 'trim|required'); $this->form_validation->set_rules('email', 'Email Address', 'trim|required|xss_clean'); /* check if any of the validations …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Query page content

    I don't have the chance to test my script above, but for any reason it failed to run, please let us know. I don't visit daniweb everyday, but I do …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Query page content

    Hi, Just to give you a simple example. By the way there are many terminologies used to describe what you want to accomplished. On a lower level, it can be …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Setting up Doctrine 2 ORM

    just to add another hint. Normally, we we add packages from packagist.org through composer. We would look for the class needed to install or setup the package. In the case …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Setting up Doctrine 2 ORM

    can you post your composer.json? Just want to see how you set up the autoload for PSR-4. For example, I have something like this for the MVC I co-wrote with …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Code Quality Check

    $_REQUEST will also process even if the method is not defined. Such as <form method="" action="yourprocessor.php"> Malicious request can also be sent to your site, in this manner yourprocessor.php?name=hello&last=world&code=javascript:;alert(something); print_r($_REQUEST); …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Save image without modifying

    you can try using is_uploaded_file('some_file'); to validate if the file was uploaded. Another alternative way of doing this is to check if the file has been moved or not. if(move_uploaded_file()){ …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in $_SESSION['class'] on click

    this should be an easy thing for you to code. Have you look at jquery ajax?
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in store checked images

    plus, you can rewrite this if($ins>0){ echo "sucess"; } to something like this if($ins){ echo "sucess"; } because anything greater than zero are always presumed to be true.
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in on focus event

    did you try something like this? if(pwd.value != rpwd.value)
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Framework VS CMS

    I totally agree with all of the definitions above. On the other hand, frameworks can limit the type of application that you can built. However, there is a framework like …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in How to cache php pages

    to help you out guys, here is the complete refactoring reference table for all video getters. +--------+ + thumb + +---------------+--------+ + youtube + false + +---------------+--------+ + funnyordie + …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Abstract fatal error

    I totally agree with the above response. Once you declare an abstract method within abstract class, it will impose a mandatory must have method in the child class. Unlike, in …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in How difficult php learning

    If you are really serious about your question and willing to invest a $1.99 for a good used PHP book. Look for the book entitled Programming PHP(second edition) by Rasmus …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in How to cache php pages

    this $content = file_get_contents("http://www.phpfastcache.com/testing.php"); get the remote page named testing.php from the phpfastcache.com by way of cURL, API or mySQL query. for example if the testing.php returns <!doctyp html> <html> …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in CodeIgniter 3.0 & Learning Resources

    Guys, allow me to add something important here. CI is backward compatible with PHP4 and therefore if you want to write a PHP5 controller, then the constructor must be define …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in PHP form to generate sequenced #

    I honestly believe that the lastInsertId() is the most error proof for this purpose.
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in CodeIgniter 3.0 & Learning Resources

    @V, dude I like your style :).
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in PHP Licensing

    I think PHP is pretty loose in implementing license compliance. Providing link to your webpage is an excellent way showing your appreciation to the creators and contributors of PHP distribution. …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in about web development

    please elaborate. It is hard to speculate .
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in How to write a javascript standallone application

    Unlike in PHP, composer.json is run by NPM in node.js. To be able to use jquery in node.js, you can run a command like this.. cd your_node_directory npm install jquery …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in How to write a javascript standallone application

    what is your os? linux or windows?
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Began Watching How to write a javascript standallone application

    Hi Guys, I need to create one app which must run in terminal or cmd, or lets say in background! The app must be able to request a url, and …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in How to write a javascript standallone application

    you probably need node.js. It is a server side javascript. Server side javascript can pretty much do what other server side scripting languages can do.
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Began Watching Adding <!DOCTYPE html> Ads White Spaces Below Images

    When I add the <!DOCTYPE html> to my page, white spaces appear below the images on the page. Why does this happen and how can I get rid of them? …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Adding <!DOCTYPE html> Ads White Spaces Below Images

    whatever happened to your <body> after </head>?
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Began Watching Need Help me for Recursive in php

    Hello, I want help for recursive in php which like structure is attachment file.. [1] **Sire (Parent)** > Sub1 ->nChild.. > Sub2 [2] **Dam (Parent)** > Sub1 ->nChild.. > Sub2 …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Need Help me for Recursive in php

    We always try to prevent ourselves from sinking into recursive function in PHP. However, if that is what you need, please consider the simple function I wrote to demonstrate how …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Began Watching Storing all exceptions in an array

    I have a custom error-handler class (actually it's an exception handler) So, when an exception is thrown, then it'll be caught and stored in the error-handler class.. After all the …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Storing all exceptions in an array

    I totally agree with it being bad. Bad if you allow your user to see it. Errors about your script, database, config file, ando other site related settings must be …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Began Watching Setting cron job in codeigniter ??

    I want to set cron job using codeigniter, in godaddy shared hosting i used the following code to execute `movies` controller's `cool` method. /web/cgi-bin/php5 "$HOME/html/MOVIESDOM.COM/index.php" movies cool Problem is it …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Setting cron job in codeigniter ??

    you need to create routing directives for it. $route['movies'] = "movies/cool"; assuming that you have movies.php in your application/controllers/ directory and it is coded something similar to this class Movies …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Created I need feedback please.

    I need to know how many people are interested in learning how to write a desktop application using PHP? If I get enough interest on this topic, then I will …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Began Watching I need feedback please.

    I need to know how many people are interested in learning how to write a desktop application using PHP? If I get enough interest on this topic, then I will …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Began Watching Time to ask that question again ...

    Time once again to ask that question: What could I be doing better? More specifically, I'm looking to answer the following: * Is the UI clear and concise? Is it …
  • Member Avatar for lorenzoDAlipio
    lorenzoDAlipio

    Replied To a Post in Time to ask that question again ...

    It would be nice if we can have server side js e.g. node.js, google polymer and jquery.mobile sections. I honestly believe that node must be treated as a server side …

The End.