V
V
Vyacheslav Marvin2020-09-27 14:54:19
PHP
Vyacheslav Marvin, 2020-09-27 14:54:19

How to insert a link in php?

Hello!

The question is. I set up sending mail after registration, but not completely. Doesn't email a link. The letter comes in the form " Hello! /r/nI am very pleased that you are interested in my project./r/nTo confirm your mail, please follow the link /r/n /r/nThis letter was sent automatically. Please do not reply to it ". I wish there was a link:

$body = 'Здравствуйте!/r/nМне очень приятно, что Вас заинтересовал мой проект./r/nДля подтверждения Вашей почты пройдите пожалуйста по ссылке/r/n
    <a href="activation.php?'. $code .'"></a>/r/nЭто письмо отправилось автоматически. Пожалуйста, не отвечайте на него';


I tried the option with echo , but it does not work, it gives errors.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Dobryshin, 2020-09-27
@Marcheslav

Well, at first there is nothing between the < a > and < / a > tags. Read here: htmlbook.ru/html/a
/r, /n - this is probably \r, \n
php can replace substitutions in the text, but not inside single apostrophes.
In HTML markup, these characters mean nothing. I advise you to study the HTML markup.
What does the echo command look like and what is the error?

A
Anastasia, 2020-09-30
@nastya97core

this is how it will work. You just need double quotes

$body = "Здравствуйте!/r/nМне очень приятно....
    <a href='activation.php?$code'>Здесь описание ссылки</a>/r/nЭто письмо ...";

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question