I have a textbox that displays the current date in format: d-m-Y When I save this the date will written to my database like: Y-m-d. For example: the current date is: 02-06-2016. My script writes this to the database as: 2002-06-16. I am using the following code to save the data to my database: What do I need …
Tag: php
PHP Unset Session Variable
I’m a noob programmer so I apologies in advance for any obvious mistakes. I’ve spent the past week creating a product database kinda thing. I’ve got too the point where I can add products using a form,…
How to CRUD using PDO Connection?
I want to CRUD using PDO Connection I know how to create insert update and delete using msql_query() but I have no idea how to do that with PDO Connection. Answer Below is the example of that
Is there a way to pull an instagram feed with PHP without logging in?
It seems that this solution no longer works – How to get a user’s Instagram feed The new API requires an access token which is dynamically assigned after passing through a login page. Is there a way to still pull a feed programmatically through PHP without jumping through the new oauth hoops? This…
how to set environment variables in apache xampp ?
I would like to add some environment variables in apache xampp in windows. I already tried the following : adding this in httpd.conf or, run this script but that doesn’t seem to work when I echo phpinfo(), there isn’t ENVIRONMENT variable in the environment section Answer I know this is an old pos…
laravel sort an array by date
hello friends I have an array that looks like this: array:3 [▼ 0 => array:6 [▼ “date” => “2016-05-31 15:08:33” 0 => “31 May 16” 1 => “aze” 2 => “2” 3 => “hi” …
Compare two 2D arrays & get intersection and differences
I have two multidimensional arrays with me.. I want to split above given arrays into three different arrays.. Answer Convert arrays to a format, where array index is the sight_id: Calculate the differences and intersection: Convert arrays back to your format:
How to UPDATE in database using mysqli prepared statement?
I’m using mysqli before to my query and now I convert it to mysqli prepared statements. I’m trying to update a particular data with upload image and I don’t know why I get the error …
How to validate current, new, and new password confirmation in Laravel 5?
I have created the password route, view and method in UserController@getProfilePassword and UserController@postProfilePassword At the moment, if I fill out the new_password field, it gets hashed and …
How to print an external page
I am trying to print an external source by clicking on a button. I found multiple scripts on the internet but none of them are working. So my question is, how can I print a specific page by clicking …