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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.