Affecting the HTML format?

Hi guys

I display these texts content below, inside a textarea the problem is it affects the formatting of the page?

<html>
<head>
<title>My Form</title>
</head>
<body>

<?php echo validation_errors(); ?>

<?php echo form_open('form'); ?>

<h5>Username</h5>
<input type="text" name="username" value="" size="50" />

<h5>Password</h5>
<input type="text" name="password" value="" size="50" />

<h5>Password Confirm</h5>
<input type="text" name="passconf" value="" size="50" />

<h5>Email Address</h5>
<input type="text" name="email" value="" size="50" />

<div><input type="submit" value="Submit" /></div>

</form>

</body>
</html>
*** End codes for myform.php ***


*** Begin codes for formsuccess.php ***
<html>
<head>
<title>My Form</title>
</head>
<body>

<h3>Your form was successfully submitted!</h3>

<p><?php echo anchor('form', 'Try it again!'); ?></p>

</body>
</html>
*** End codes for formsuccess.php ***

How to fix this?

Thanks in advance.

Hi @iridion9. There seems to be something wrong with the formatting of your code. There should be 3 backticks on the line just before the code, and 3 backticks on the line after the code to make it display properly in your post. Or just highlight the code and select the </> from the icons above the textarea.

OKay I fixed the post now.

Can you help me solve the problem?

thanks in advance.

Am I correct in assuming that those two blocks of code, separated by the *** lines, are things that you want to display inside a textarea, and that you have some php code that does so?

If so, shows us the PHP code that is responsible for outputting the main html page that draws the textarea and tries to insert this text. If not, please explain further.

In what way is affecting the formatting of the page? What CSS have you got?

Incidentally, you are misusing the h5 tags there as heading tags should be used in sequence. What you should be using there is <label> tags.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.