Jump to content

need help with making an indent or tab


nicolette

Recommended Posts

ok so here is a section of my code

if (!isset($_POST['title']) || trim($_POST['title'])=="")
	{
		die ('Error: You must enter a course title.');
	}
else
	{
		$title = $_POST['title'];
		echo "<p><span style='font-weight:bold'>Course Title</span><span style='font-weight:normal'>           :   $title</span></p>"; 
	}
if (!isset($_POST['instname']) || trim($_POST['instname'])=="")
	{
		die ('Error: You must enter an instructor name.');
	}
else
	{
		$instname = $_POST['instname'];
		print "<p><span style='font-weight:bold'>Instructor</span><span style='font-weight:normal; text-indent:500px'>:  $instname</span></p>";
	}if (!isset($_POST['phn']) || trim($_POST['phn'])=="")
	{
		die ('Error: You must enter a phone number.');
	}
else
	{
		$phn = $_POST['phn'];
		print "<p><span style='font-weight:bold'>Phone </span><span style='font-weight:normal'>\t$phn</span></p>";
	}

 

ok now obviously the first else statement is bad with all the   I know but that is the problem I am running into I tried a css style on the next one and that isn't indenting and on the last one I have tried using \t although I don't know if it needs "", '', or nothing in this situation I tried all variations and I couldn't get that to work either can someone assist I need the output to look like this

 

Course Title            :  Whatever

Instructor              :  Whatever

etc...

 

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.