Skip to content

Tag: html

Inserting data into MySQL from a dropdown

I’m trying to make a dropdown list that allows users to select a training program that matches their needs, so when they select it, the option will go into a table in the MySQL database. This is my HTML form: What I need is an SQL query that will go with it, so when they select ‘Example option 3&#…

Run PHP background program on HTML without slowing down a page load

I send a trigger email when someone opens a page with things like an IP address in the email body. I use this to run the PHP scrip from another page. This PHP script takes time to process and it slows down the loading of a page for a customer. in the trigger.php is (I have taken out some lines

Convert PHP array into HTML tag attributes separated by spaces

I need to convert a PHP array into HTML tag attributes, with spaces and quotes, this is an example: This is the result I need to achieve: There is any PHP function to do it? I am trying these: http_build_query array_walk Answer You can also use this easy one line code, please follwo below code:: Output attr1=…

html5 date field input is correct but output is reversed

if have the following problem. in my html5 datefield, i have the input order dd.mm.yyyy (for example todays date: 27.04.2017). thats correct in my country and timezone. the posted value is in reversed order to my input. its yyyy-mm-dd (for example todays date: 2017-04-27). is there any way to change the timef…