We all use DB::transaction() for multiple insert queries. In doing so, should a try…catch be placed inside it or wrapping it? Is it even necessary to include a try…catch when a transaction will …
HTML and PHP in one file
I’m a PHP newbie trying to sort some basics out. I have a user-form that leads to a mysql select query, which works fine. Every tutorial I have found so far has the standard form tag, ie: action=’script.php’ method=’post’. This obviously opens script.php in a new tab/window thoug…
MySQL showing that select * from has internal limit 0,1000 . how to stop it
i am accesing my Mysql database server using Mysql workbench.and i have encountered a prolem. there is a table, named tags, in my database.which will have have more than thousands of tags in future.the problem is when i am executing select * from tags; query Mysql workbench is executing this (or taking action…
is_page and query_posts not working correctly
For some reason the following code is displaying both types of posts instead of just the specified post using query_posts. I am not quite sure what is going on, but it appears that the loop is ignoring my condition of is_page(‘news’) or is_page(‘othernews’). Does anyone have an idea wh…
Chrome not clearing SESSION COOKIES on close/exit
I’m developing an app on localhost using: Google Chrome 33.0.1750.154 m XAMPP Version 1.8.3 I’ve been using these for a while now and today all of a sudden Chrome is not clearing session cookies …
Laravel use same form for create and edit
Am quite new to Laravel and I have to create a form for create and a form for edit. In my form I have quite some jquery ajax posts. Am wondering whether Laravel does provide for an easy way for me to use the same form for my edit and create without having to add tons of logic in my
PHP 5.4: Getting Fully-qualified class name of an instance variable
I know there is a static class field on PHP 5.5, but I have to stick to PHP 5.4. Is it possible to get the fully qualified class name from a variable? Example: namespace MyAwesomeNamespace class …
laravel class not found (works on localhost but not on DO server)
This is a repeat question – eg: Laravel 4 migrations – class not found However, I’ve tried every solution (from every forum I could find) and cannot figure this out. Scenario I created a Laravel 4 project on my local machine – added some classes, controllers, views, etc – the pro…
Why php tag is not working in html file?
I have a register.php file and I have defined $name=”” inside that file and now in the html form I have: But the output is <?php echo $name; ?> instead of empty! Any idea of how I can fix this? Answer Your web server will server the HTML page as is. It will only parse the HTML as best as
How to determine if PHP OPcache is enabled or not?
I am trying to enable opCache on my server (ubuntu 12.04 LTS, running apache 2.4.7 with PHP Version 5.5.10-1+deb.sury.org~precise+1). Before starting to do anything, I read this highly relevant post which told me that opCache is disabled by default and I have to manually enable it. I went into php.ini and fou…