Relative Content

Tag Archive for phpmysql

calculate years without so many vars

Is there a way to calculate the age of the user in PHP or from MySQL directly without using so many vars? I mean, what is the shortest code/way ?

wrong data insert in MySql via PHP

I have a table with some columns and one column with Varchar(150) type, When I insert data by PHP all columns stored correctly except this Varchar column and stored too 75 chars of 999999…9999999 instead of 150 chars length of original string, what is the issue?

Delete function works but localhost then displays HTTP ERROR 500

I’m trying to make a simple posting website with php and so far I’ve successfully connected with my sql tables and able to post and display data from the tables. I’ve made a function to delete a post and it successfully deletes data from the table but the header("Location:..."); doesn’t seem to redirect to my php page and it displays a HTTP ERROR 500.

why I can’t insert user input into the database?

I’m new with PHP and MYSQL , and I’m trying to insert some user input into the database after I’ve established the connection and there was no error the database was successfully created.
However, when I try to insert some user input and after pressing the submit button in the form nothing happens at all. I can’t find the issue, so please if you have any clue I would appreciate some help.