How to insert and display a url link in a MYSQL database with PHP
How to insert and display a url link in a MYSQL database with PHP To insert a URL link in a MySQL database, it suffices to encode the character string (STRING). Before inserting it into the database Example: $url = "test"; $url= base64_encode($url); Now once inserted, you have to DECODER it so that it can display correctly: $decode=base64_decode($url); Finally add it in an HREF tag: <a href='$decode'>URL</a> Step 1: create a database: CREATE DATABASE pacific; use pacific; create table pacific(id int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY , nom varchar(100) not null, description varchar(255) not null, prix double , url varchar(255) ); alter table pacific add email varchar(25) NOT NULL; Step 2: Once your database has been created, here are the Code to insert data into the database. Copy and paste the code below into notepad ++ or other code editor. Give it to INSERT.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ...