I have made a form where user post data like names product and links. For validation I am using FILTER_VALIDATE_URL
. Now what i want is after validation only host insert into database. like https://www.google.com. Only www.google.com insert in database. For doing this i am using
$website = var_dump(parse_url($websitex, PHP_URL_HOST));
$sql = "INSERT INTO test (Name, Contact, Product) Value ($name, $website, $product)
$result = mysqli_query($dbc_conn, $sql);
Now the problem the host data not going into database plus the host array show into the screen. What i want is only host data insert and array not show on the screen.