Hi i have doubt regarding how i can exact match my database timestamp with my date i'm getting date from my URL query string which looks like this 2017-07-19 and my stored date in my database is 2017-07-19 13:40:23 Below query returns 0 results despi
I can delete comments when i type this in the url.. /delete/{id} from the comment. I need that to be private/disabled. Route: Route::get('/delete/{id}', 'commentController@delete'); controller: function delete($id) { comment::where('id',$id)->delete(
im making a form on php which saves data into the database here is the code for it where i send data from php form to the database: <?php $users_name = $_POST['name']; $users_email = $_POST['email']; $users_phoneNumber = $_POST['phNo']; $users_cnic =
I have a table like this: Table: item isBeautiful: Boolean isGreat: Boolean isAvaliable: Boolean I want to make a query with Eloquent that gives me all the items that are avaliable and are either isBeautiful or isGreat, or both. $avaliableitems = ite
I have a string string(5) "388.0". I simply want to get exactly float number with one zero or two zero or whatever numbers comes after decimal. How can I achieve it? Simply (float)$val gives me only float(388) without zero.Have you tried the bui
Apache simply unable to access directory (forbidden 403 error), unable to identify the reason why ? I have made a vhost as: created: /etc/apache2/sites-available/dev.testvhost.com.conf <VirtualHost *:80> DocumentRoot /home/najam/projects/php/testvho
so I started to use Laravel auth and in my Route in web middleware I wrote : Route::group(['middleware' => ['web']], function () { Route::auth(); }); and I got this error : Maximum function nesting level of '100' reached, aborting! and I tried to use
Below is my code to check if the record is duplicate or not. $Category = \App\Models\Category_Model ::where("Category", "=", $request->input('Category'))->first(); if($Category != null) { return 'Duplicate'; } Is there any way to
I have a copy of 350+ images on my sever, when a person tries to view one, if it is more than 5 minutes old, I want my sever to check with another website that I am mirroring data from(they insist on me mirroring instead of hotlinking) and get the ne
I need to extensively use statuses in mt project. I need them for my users (active, suspended, etc), an entity (active, pending_activation, inactive) and for my subscriptions(active, on_grace_period, not_subscribed, never_subscribed). So far I though
We have a bunch of data in a MySQL database which call by using this phpcode: $query = "SELECT * FROM `dmt_objects` WHERE PipelineAndWorkflow = 'RWP WF Ready for 4Sprint' ORDER BY `Team` DESC ;"; $select_projects = mysql_query($query); $project_
I want to hide or remove VAT (tax) line from WooCommerce order emails. Result comes out from this function "get_order_item_totals()". Already I can hide tax label from emails by using following code. function sv_change_email_tax_label( $label )
I have 512 * 512 big size PNG images with transparency. How to create 256 * 256 PNG images with smaller file size, which also support transparency and maintaining quality. EDIT: I'm using this code but the output image is cropped and not supporting t
I have a table (user_zip_codes) with the users' zip_code, latitude and longitude. I have found a function here on stackoverflow that finds zip codes within a specific radius: function zipcodeRadius($lat, $lon, $radius) { global $mysqli; $zipcodeList
I want to join two tables together to get retrieve all the entities in one search. I have a one to many relationship: Jedi and Member. One member group can have many Jedi's. I want to make a form to search by one entity and displays all of the inform
How can I get the numeric value from an string? In my case string is R1350.00 and Expected output: 1350 I tried the following: $result = preg_replace("/[^a-zA-Z0-9]+/", "", 'R1350.00'); but I also want to remove the last two string 00.
I can not delete user in codeigniter, When i click link to delete, it not working. It's a series on tutlus: Build a CMS in CodeIgniter. link delete: /admin/user/delete/3 Controller: class User extends Admin_Controller{ public function __construct() {
iam back with another question to do with mvc and codeigniter. just getting a bit confused with the concept of MVC. First of all i have a button. i want it to reference another page. how i was going to access the next "view" or page was from thi
I am working with Slim PHP for the first time and I am trying to understand one of the concepts. In the slim PHP documentation, it states: Request Body Use the request object's getBody() method to fetch the raw HTTP request body sent by the HTTP clie
I am following this tutorial from google for google maps: https://developers.google.com/maps/articles/phpsqlajax_v3?hl=es I formatted my code as so: echo '<markers>'; // Iterate through the rows, adding XML nodes for each for($i = 0; $i< $brewery
I need to get very specific values from a feed such as this: http://gdata.youtube.com/feeds/api/videos/iIp7OnHXBlo Some of the nodes I have to read from these bizarrely-formatted XML feed are: <title type="text">Uploading YouTube Videos wi
I've successfully created a connection to an MSSQL database, executed a query and returned the results using mssql_num_rows. I'm able to get $numRows to echo and show "Rows Returned" on the page. The columns in the table have these names: employ
I want to create custom events called user_logged so that i can attach my listeners to those events. I want to execute few functions whenever user has logged in.Create a class which extends Symfony\Component\EventDispatcher\Event. Then, use the event
I'm trying to create a page where I input a MYSQL query: SELECT column1,column2 FROM table;, and dynamically create an HTML table with column titles. EDIT: removed most of my question, just left the question part. I have since created a script that d
I am trying to build a list of all the city pages on ghix.com, which does not have such a complete directory. To do this I am using their 'city id' which is unique for each city, but does not follow any particular order. I am using cURL and PHP to lo
All the guides for installing PEAR on wampserver, such as the Symfony guide, say I am to run a go-pear.bat script within some PEAR directory. I am on wampserver 2.1 and there is no PEAR directory and no go-pear batch script to be found. Is this just
I have the this method: public function search($searchKey=null, $summary=null, $title=null, $authors=null, $paginationPage=0) { ... } And I'm trying to retrieve all parameters with this: $Class = new Search(); // Get parameters $ReflectionMethod = ne
I'm trying to figure out a way to read GET method information from a form with javascript. Our IT department has our servers on lockdown, and as the web team we can only use javascript to accomplish our tasks. I'd use PHP if I could, but I can't. Wha
I'm including a PHP script that changes the URL. // index.php ob_start(); include "script.php"; // This script redirects using header("Location:"); $out = ob_get_clean(); // I use the $out data for calculations echo $out; Is there a si
What is the state generating Excel documents from a PHP application on a Linux server? I am interesting in creating Office 97 (xls) Excel files. My limited research on the subject has turned up this Pear package. It appears to be in beta status since