Jump to content

BBCODE? PHP Form Echos


DeanWhitehouse

Recommended Posts

Hi, i am creating a CMS/Website template system.

I want it so that when the users enter say the title message into a form, but when i test this, the data is displayed on one line( <br> ).

How can i make it so that when they enter the data, it saves it as HTML format(in the sense of breaklines)

 

Here are the codes i am using

$intro = "Welcome to my portfolio, this site has been entirerly coded by me
Please have a look at other pages";

<html>
<head>
<?
require_once 'includes/main.inc.php';
require_once 'includes/db_connect.php';
require_once 'includes/config_table.inc.php';
require_once 'includes/header.php';
require_once 'includes/footer.php';
require_once 'nav_bar.php';
?>
</head>
<table id="time"><tr><td><?php echo gmdate('l jS \of F Y');?><br><?php echo gmdate('h:i:s A');?></td></tr></table>
</html>
<?php
if (is_dir(install)) {
     echo "<p class='exists'><br>Please remove the install folder</p>";
} else {
echo "Please go to the admin centre to cutomise the site";
}
echo "$intro";
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/101934-bbcode-php-form-echos/
Share on other sites

<html>
<head>
<?
require_once 'includes/main.inc.php';
require_once 'includes/db_connect.php';
require_once 'includes/config_table.inc.php';
require_once 'includes/header.php';
require_once 'includes/footer.php';
require_once 'nav_bar.php';
?>
</head>
<table id="time"><tr><td><?php echo gmdate('l jS \of F Y');?><br><?php echo gmdate('h:i:s A');?></td></tr></table>
</html>
<?php
if (is_dir(install)) {
     echo "<p class='exists'><br>Please remove the install folder</p>\n";
} else {
echo "Please go to the admin centre to cutomise the site\n";
}
echo "$intro";
?>

the

\n

adds a line break

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.