T
T
Torrrn2020-05-21 19:25:20
PHP
Torrrn, 2020-05-21 19:25:20

How to make html php from a string?

Hello, there is a code like this

'<html><head></head><body>Test message</body></html>

It leaves through a post request in php, how to parse it so that it can be sent to the mail, you need to bring it with this format

$body ="<table  width=100% border=0><tr><td>";
$body .= "<img width=200 src='";


Now when sending in a simple way, kryakozyabry comes
5ec6aba0f002a056646625.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kontrael, 2020-05-21
@Kontrael

I don't understand where you get "body=" on the screen, but generally run the html through urldecode.
But in general, you have chosen a bad implementation path.
Letters are not sent that way. You must have prepared letter templates that are in separate files, you read them and substitute the necessary data into the templates.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question