Htaccess Problem Url Friendly

I have problem with this htaccess in STATIC URL

RewriteEngine On    
RewriteRule ^readlex/(.*)$/?$          readlex.php?slug=$1 [NC,L]

DINAMIC URL work fine only with defined CONSTANT: Example

<a href="<?php echo BASE_URL.READ_LEX ?>Le-mura-di-Lucca">Lucca</a>

Result = localhost/mysite/readlex/Le-mura-di-Lucca

STATIC URL not work (??)

<a href="localhost/mysite/readlex.php?slug=Le-mura-di-Lucca">Lucca</a>

Result = localhost/mysite/readlex.php?slug=Le-mura-di-Lucca">Lucca

***Unfortunately I can't insert the php CONSTANTS in mysql varchar/text

Mail Confirmation Order and Shopping Cart

Hi.. I would like to send an order confirmation email with the cart details. But it doesn't show the string in php, only html.
My script:

$to = 'adolph@site.it';
$subject = 'New Order';
$from = 'info@newsite.it'; 

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
 // Create email headers
$headers .= 'From: '.$from."\r\n".
    'Reply-To: '.$from."\r\n" .

$message = '<html><body>';
$message .= '<h1 style="color:#f40;">Thanks for Your Order</h1>';
$message .= '<p style="color:#080;font-size:18px;"> Your order  details:</p>';
$message .= '<?php echo $array_cart_name[$i]; ?>';      //NOT WORK  
$message .= '</body></html>';


mail($to, $subject, $message, $headers);

Result:
Thanks for Your Order
Your order details:

<?php echo  $array_cart_name[$i]; ?>  This is Hidden

A solution is possible??

How obtain url friendly with htaccess

Hi ... how can i have url seo friendly from database ?? Example:
localhost/myshop/product.php? id = 95
Or:
https://www.myshop.it/product.php?id=95

I have done several tests with .htccess but it doesn't work.
I would like to have as follows:

https://www.myshop.it/product.php/shoes-armani
Or:
https://www.myshop.it/shoes-armani

tbl_product
+-------------+----------------+-----+----------------+
| p_id        |p_name                | p_name_friendly|
+-------------+----------------------+----------------+
|           95| Shoes Armani         |shoes-armani    |
|           96| Bag Cartier  |       |bag-cartier     |
+-------------+----------------------+----------------!

Breadcrumbs from menu mysql

I have three tables in mysql which make up the dropdown menu, as below code. I would like to get a $ breadcrumb variable with link from this menu. Example:

Home / Woman

Home / Woman / Clothes

Home / Woman / Clothes / Women T-Shirth-2

It is possible??

<div id="sitemaps" class="menu">
                            <ul>
                                <li><a href="index.php">Home</a></li>

                                <?php
                                $statement = $pdo->prepare("SELECT * FROM tbl_top_category WHERE show_on_menu=1");
                                $statement->execute();
                                $result = $statement->fetchAll(PDO::FETCH_ASSOC);
                                foreach ($result as $row) {
                                    ?>
                                    <li><a href="product-category.php?id=<?php echo $row['tcat_id']; ?>&type=top-category"><?php echo $row['tcat_name']; ?></a>
                                        <ul>
                                            <?php
                                            $statement1 = $pdo->prepare("SELECT * FROM tbl_mid_category WHERE tcat_id=?");
                                            $statement1->execute(array($row['tcat_id']));
                                            $result1 = $statement1->fetchAll(PDO::FETCH_ASSOC);
                                            foreach ($result1 as $row1) {
                                                ?>
                                                <li><a href="product-category.php?id=<?php echo $row1['mcat_id']; ?>&type=mid-category"><?php echo $row1['mcat_name']; ?></a>
                                                    <ul>
                                                        <?php
                                                        $statement2 = $pdo->prepare("SELECT * FROM tbl_end_category WHERE mcat_id=?");
                                                        $statement2->execute(array($row1['mcat_id']));
                                                        $result2 = $statement2->fetchAll(PDO::FETCH_ASSOC);
                                                        foreach ($result2 as $row2) {
                                                            ?>
                                                            <li><a href="product-category.php?id=<?php echo $row2['ecat_id']; ?>&type=end-category"><?php echo $row2['ecat_name']; ?></a></li>
                                                            <?php
                                                        }
                                                        ?>
                                                    </ul>
                                                </li>
                                                <?php
                                            }
                                            ?>
                                        </ul>
                                    </li>
                                    <?php
                                }
                                ?>

    <div class="breadcrumb" style="margin-top:20px"><a href="<?php echo BASE_URL; ?>">Home / </a> <?php echo $breadcrumb ?>
    </div>



tbl_top_category
+-------------+----------------------+--------+
| tcat_id     | tcat_name            | active |
+-------------+----------------------+--------+
|           1 | Men                  |      1 |
|           2 | Woman                |      1 |
|           3 | Kids                 |      1 |
+-------------+----------------------+--------+


tbl_mid_category
+-------------+----------------------+--------+
| mcat_id     | mcat_name            | tcat_id|
+-------------+----------------------+--------+
|           1 | Men Shoes            |      1 |
|           2 | Men Clothes          |      1 |
|           3 | Men T-Shirth         |      1 |
|           4 | Women Shoes          |      2 |
|           5 | Women Clothes        |      2 |
|           6 | Women T-Shirth       |      2 |
|           7 | Kids Shoes           |      3 |
|           8 | Kids Clothes         |      3 |
|           9 | Kids T-Shirth        |      3 |
+-------------+----------------------+--------+

tbl_end_category
+-------------+----------------------+--------+
| ecat_id     | ecat_name            | mcat_id|
+-------------+----------------------+--------+
|           1 | Men Shoes-1          |      1 |
|           2 | Men Shoes-2          |      1 |
|           3 | Men Shoes-3          |      1 |
|           4 | Men Clothes-1        |      2 |
|           5 | Men Clothes-2        |      2 |
|           6 | Men T-Shirth-1       |      3 |
|           7 | Men T-Shirth-2       |      3 |
|           8 | Women Shoes-1        |      4 |
|           9 | Women Shoes-2        |      4 |
|           10| Women Shoes-3        |      4 |
|           11| Women Clothes-1      |      5 |
|           12| Women Clothes-2      |      5 |
|           13| Women T-Shirth-1     |      6 |
|           14| Women T-Shirth-2     |      6 |
|           15| Kids Shoes-1         |      7 |
|           16| Kids Shoes-2         |      7 |
|           17| Kids Shoes-3         |      7 |
|           18| Kids Clothes-1       |      8 |
|           19| Kids Clothes-2       |      8 |
|           20| Kids T-Shirth-1      |      9 |
|           21| Kids T-Shirth-2      |      9 |
+-------------+----------------------+--------+

How i can change variable php in one page

Hi ... I want to create some php pages where I have to change the variables ( top of the page ) through a form and of course save them on the same page. I don't want to use databases. It's possible???

<?php
$pageurl = "text1";
$title = "text2";
$description = "Desc...Desc.... Desc.........";
$image = "text3";
$price = "12";
$conf = " H 30";
?>

<!DOCTYPE html>
<html lang="it" >

<head>  
<meta charset="UTF-8">

  <title><?php echo $title; ?> | Mysite - Plants collection</title>
  <meta name="description" content="<?php echo $description; ?>">
  <meta property="og:url"           content="https://www.mysite.it/shop/<?php echo $image; ?>.php" />
  <meta property="og:type"          content="product" />
  <meta property="og:title"         content="<?php echo $title; ?>|Site" />
  <meta property="og:description"   content="<?php echo $description; ?> " />
  <meta property="og:image"         content="https://www.mysite.it/images/<?php echo $image; ?>.jpg" />
  <meta property="og:site_name" content="Mysite">