ko ko 97 Practically a Master Poster

You're overriding everything if post_id exists in URL. Check link 8-10 and 17-20. You're putting old data every time unless your post_id is not include in URL. If 'judul' and 'isi_berita' is empty string currently, they'll always empty every time you tried to update. I don't know why you assign your old data that are issuing on line 17-20. You only need values from form, not from your database to update / insert.

$post_id = $data['post_id'];
$page = $data['page'];
$judul = $data['judul'];
$news = $data['isi_berita'];

You code looks too messy. Have you tested my code ? As I mentioned above, split your create / edit page seperately is better. And put your logic in specific file and that looks more nicer.

ko ko 97 Practically a Master Poster

As cereal pointed out, post_id is missing in form action URL. Append it to your form action as cereal shown above.

However, you should better split different page for create and update process. I made some changes in your code and it should also work fine. It's not tested and use on your own way upon it.

<div id="menu">
      <center>
        <h2>Static Page Manager</h2>
      </center>
      <p>&nbsp;</p>
  <p>&nbsp;</p><center>
      <p>
<?php
    include('../includes/koneksi.php');
    /**
     * Firstly, check if there is post_id in URL, if so, you're editing, if not, you're creating
     */
    $post_id = isset($_GET['post_id']) ? $_GET['post_id'] : '';

    /**
     * Assume post_id provided in URL, then check if the post already exists
     */
    if( $post_id != '' ) {
        $result = mysql_query("SELECT * FROM static_page WHERE post_id =".$post_id) or die(mysql_error());
        $post = mysql_fetch_array($result);
    } else { // not found post
        $post = NULL;
    }

    /**
     * When form submit
     */
    if( isset( $_POST['ok'] ) ) {
        /**
         * Grab data from form. Don't forget to validate them as well
         */
        $news  = isset($_POST['news']) ? $_POST['news'] : '';
        $judul = isset($_POST['judul']) ? $_POST['judul'] : ''; 
        $page  = isset($_POST['page']) ? $_POST['page'] : '';

        /**
         * If post found, then update it
         */
        if( $post != NULL && !empty( $post ) ) {
            $sqlstr = "UPDATE static_page SET page='".$page."', judul='".$judul."', isi_berita='".$news."' WHERE id=".$post['post_id'];

            // Run your query
            $result = mysql_query($sqlstr) or die(mysql_error());

            // Set your message
            $confirmation = ($result) ? "Data telah tersimpan." : "Gagal menyimpan data.";

        } else {
            /**
             * You're creating new post. …
ko ko 97 Practically a Master Poster

It should be $result, not $data, the correct one is $numRows = mysql_numrows($result)

Also, you've already assigned student's ID to $student_id variable, why $_GET['id'] in your sql and it was not filter properly. And mysql is deprecated and there is new mysqli and PDO for more secure database communication.

ko ko 97 Practically a Master Poster

With my thought, better pick up a CSS framework such Twitter Bootstrap or 960.gs would help you to make your template easily with their default CSS properties in a short while. You can also try free CSS templates to download into your PC and customize those templates according to your needs. Or post your web site link here and then, no one need to download your CSS and everyone can see your CSS via their browser view source and they can also fix your CSS bugs and let you know what you need to do. Good luck. Table layout sucks yet! :)

ko ko 97 Practically a Master Poster

Try. This one is working on my localhost.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)[/]?$ $1.php [NC]

Add below at the bottom of your htaccess to rewrite if theres is no rewrite rule for request, and it'll rewrite to index.htm. You can change index.htm to anything (index.php/asp/jsp) you like to rewrite if rewrite failed.

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^(.*) [NC]
RewriteRule ^(.*)$ index.htm

BTW, @diafol, what kind of problem with FTP with uploading htaccess file ? I just wondering to know coz I'm very OK with htaccess and FTP.

ko ko 97 Practically a Master Poster

Change echo "<a href='fullnews.php?id=$id'>$headline</a>"; to echo '<a href="fullnews.php/' . $headline . '-' . $id . '">' . $headine . '</a>';

In htaccess

RewriteEngine On
RewriteRule ^fullnews.php/(.*)-[0-9] fullnews.php?id=$2

It'll rewrite to "fullnews.php?id=123" when visitor visits fullnews.php/headine-123", headline is that you set from query.

ko ko 97 Practically a Master Poster

$stringResult = $stringResult . "['".$resultValue['name']."',".$resultValue['quantity']."],";

The problem is as shown above as bold text. Use another variable to assign. Just like:

$newStringResult[] = $stringResult[$resultValue['name'],$resultValue['quantity']];

The bracket [] defined as array, so, you can get all values within loop as array. Otherwise, you'll only get last value.

ko ko 97 Practically a Master Poster

Probably, you may have XMLHTTPRequest problem. Are you sure crearXMLHttpRequest() works on IE and you get new XMLHTTPRequest ? Should try what @pritaeas said.

ko ko 97 Practically a Master Poster

select * from emp1, make sure that table name is correct, emp with 1 or l ?

ko ko 97 Practically a Master Poster

Probably, $get has NULL. Check the query again. And are you sure that the connection succeed ? Make sure your mysql_connect passed or not. Anyway, use the error handler.

mysql_connect($host, $user, $pass) or die('Couldn\'t connect to MySQL. Error: ' . mysql_error());

SELECT * FROM songs, check this query manually in PHPMyAdmin via the browser.

ko ko 97 Practically a Master Poster

session_start() should be very top of the file before returning any HTML output and should not have empty line or space between php opening tag and session_start(). Move 'session_start()' before any html tags. Below is the valid format.

<?php
session_start();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/styles.css" />
</head>
<body>

<?php
if(!isset($_SESSION['captcha']))
{
	session_register('captcha');
}

$PHP_SELF = $_SERVER['PHP_SELF'];
$stringa = '';
$cifre = 5;
for($i=1;$i<=$cifre;$i++)
{
	$letteraOnumero = rand(1,2);
	if($letteraOnumero == 1)
	{
		// lettera
		$lettere = 'ABEFHKMNRVWX';
		$x = rand(1,11);
		$lettera = substr($lettere,$x,1);
		$stringa .= $lettera;
	}
	else
	{
		$numero = rand(3,7);
		$stringa .= $numero;
	}
}
$_SESSION['captcha'] = $stringa;

?>

<table width="100" height="54" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="Table_01">
  <tr>
    <td height="39" align="left" valign="top" class="imagesstyle"><h1 class="style2"><img src="3EImages/dot3E.jpg" alt="" width="29" height="29" align="left" class="imagesstyle" />Contact Us<br />
   </h1>
   <td height="39"  valign="top" style="padding-top: 5px"><a href="http://www.3esolutionsindia.com/" target="_blank">Home</a></td>
   </td>
  </tr>
  <tr>
    <td  align="left" valign="top" class="tableDetail"><p><img src="3EImages/ContactUs/Enquiry.jpg" width="170" height="124" align="right" class="imgbrdr" /><strong>Thanks for showing interest in  3E Solutions.</strong> <br />
            <br />
Kindly fill all the required  fields. We will get in touch with you within 24 hours.</p>
      <p>&nbsp;</p>
   <form id="captchaform" action="contact.php" method="post" style="width:300px;">
        <p align="right"> <label>
		        *Name:
		        <input type="text" name="name" id="name" size="30"/>
		        </label></p>
		        <p align="right">*Email Address:
		          <label>
		          <input type="text" name="email" id="email" size="30" />
		          </label>
		        </p>
		        <p align="right">Phone No:
		          <label>
		          <input type="text" name="phone" id="phone" size="30" />
		          </label>
		        </p>
		        <p align="right" style="">Interseted in:
		          <label>
		          <textarea name="interested" cols="30" rows="6" wrap="physical" id="interested">
		          </textarea>
		          </label>
		</p>
		<p align="right">
		<div id="captcha">
		<p align="right"><img src="captcha.php" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
		<p align="right"><label for="code">*Enter Code: </label>
		<input type="text" name="code" id="code" size="30" /></p>
		</div>
		</p> …
ko ko 97 Practically a Master Poster

" <div class=\"shopping_cart\">
<div class=\"cart_title\">Shopping cart</div>

<div class=\"cart_details\">Items
echo $_SESSION; <br /> /// this line has error
<span class=\"border_cart\"></span>
Total: <span class=\"price\">echo $_SESSION; </span> ////this line has error also
</div>

<div class=\"cart_icon\"\><a href=\"#\" title=\"header=[Checkout] body=[&nbsp;] fade=[on]\"><img src=\"images/shoppingcart.png\" alt=\"\" title=\"\" width=\"48\" height=\"48\" border=\"0\" /></a></div>

</div>";

Wrong syntax. Try with below:

echo  "<div class=\"shopping_cart\">\n
        	<div class=\"cart_title\">Shopping cart</div>\n
            
            <div class=\"cart_details\">Items " . $_SESSION['Items'] . "<br /><span class=\"border_cart\"></span>
            Total: <span class=\"price\">" . $_SESSION['Price'] . "</span>\n
            </div>\n            
            <div class=\"cart_icon\"\><a href=\"#\" title=\"header=[Checkout] body=[&nbsp;] fade=[on]\"><img src=\"images/shoppingcart.png\" alt=\"\" title=\"\" width=\"48\" height=\"48\" border=\"0\" /></a></div>\n
        </div>\n";

'\n' for line feed. It will force to appear HTML tag from the new line in the source code.

ko ko 97 Practically a Master Poster

Try this:

<html>
<head>
<title>My first PHP By my own</title>
</head>
<body>
<?php
echo "My first program and its a failure";
?>
</body>
</html>

You should not have the plain text directly between the head tags. You can do in body tags. Also, you must write semi-colon ';' at the end of every PHP statements.

karthik_ppts commented: useful +5
ko ko 97 Practically a Master Poster

It's not important if the user turn-off javascript or not. You might check from the server-side at least for the security reasons like mysql injection.

Xufyan commented: xufyan :) <3 +3
ko ko 97 Practically a Master Poster

@twiss, thanks man. You're right, I forgot it.

ko ko 97 Practically a Master Poster

OK. I'm not XML expert. But I can do a little bit like following.

<?xml version="1.0"?>
<book>
    <title>XML</title>
    <price>$3.0</price>
</book>
<book>
    <title>HTML</title>
    <price>$4.0</price>
</book>

As understanding your table, you've only two title, and price for each book. You can add addition element such <isbn>23232</isbn><published_date>Jun-28-2012</published_date> , ISBN number and the published date of the book as you like.
Hope that it will appreciate for you.

ko ko 97 Practically a Master Poster

Sorry! It is wrong. Here is correct one.

$sql .= ($i == (count($check)-1)) ? " `$check[$i]`" : " `$check[$i]`,";

Echoing the query string on the browser, before executing is good practice. You'll see your query is properly collect or not. And you can copy and paste this string into your phpMyAdmin and can see how the query shows.
Hope this help!

ko ko 97 Practically a Master Poster

Group the checkbox with the unique name like @IIM method. But, you don't need many query within the loop. It is unnecessarily extra process. Try this:

if(isset($_POST['submit'])){
	$sql = "SELECT";
	$check = (array) $_POST['a'];
	for($i = 0; $i < count($check); $i++) {
		//assign the query string
		$sql .= ($i <= count($check)) ? " `$check[$i]`" : " `$check[$i]`, ";
	}
	//concatenate the require strign for query
	$sql .= " from tbl_hindi";
	//execute the query
	$query = mysql_query($sql);
}

As you see, the query string will concatenate within the loop with the amount of the check-box which are already checked by the users. There is no problem even if you don't have 'SELECT *', when all check-boxes was checked. In this condition, the query string will be

SELECT `name`, `address`, `mobile`, `dob`, `namdan_date`

. It's similar to 'SELECT *' if your table was built with these fields.
Also, line 11, you've this code.

<form name="myform" action="<?php $_SERVER;?>" method="post">

<?php $_SERVER['PHP_SELF'];?> should be <?php echo $_SERVER['PHP_SELF'];?>

IIM commented: Nice work...i was thinking something similar but can't conclude to exact point.... +2
ko ko 97 Practically a Master Poster

What value are you meaning ? This one $sector=$_GET['sec']; ?
Your question is not clear.

ko ko 97 Practically a Master Poster

I started from there.http://www.html.net/
And here is the good place for CSS design www.csszengarden.com.

Start from basic, and go professional. Below is the simple road map.
HTML+CSS+Js => PHP/ASP.Net/JSP/Framework

Enjoy with your learning.

ko ko 97 Practically a Master Poster

$query = "UPDATE account SET `account_type` = '$atype', `fd_period` = 'fdper' WHERE `account_number`= anum";

Are you using this statement ? 'anum' should be '$anum'.

diafol commented: good spot +13
ko ko 97 Practically a Master Poster

Is '$pd_image' already has absolute URL including your host, domain (e.g., www.example.com/images/image.jpg).If so, let me do it:

<img src="http://www.example.com/resize.php?width=180&height=180&image=<?php echo $pd_image; ?>" alt="<?php echo $pd_name; ?>" />

The above should work if '$pd_image' has absolute path to the image (eg.,http://www.example.com/images/). If not concatenate it by following:

<img src="http://www.example.com/resize.php?width=180&height=180&image=http://www.example.com/<?php echo $pd_image; ?>" alt="<?php echo $pd_name; ?>" />

You're wrong way to use: resize.php?<?php echo $pd_image; ?>? The image file only need to pass after 'image=' parameter.

ko ko 97 Practically a Master Poster

It doesn't work with relative URL, I tested it. Use by following.

yoursite_url/resize.php?width=180&height=180&image=yoursite_url/image_path/image

No slash '/' after the 'resize.php'. Use '?' and parameters follow by that. The above is correct way.
Hope this help.

ko ko 97 Practically a Master Poster

@MrDJK, you're right.
@Jaklins, IE has different known for MIME-TYPE. You'll probably know that echo the file type. IE shows 'jpg' as 'pjpeg' and 'png' as 'x-png'. So, the upload will be done with adding a few lines for those MIME types.

$_FILES["fileField"]["type"] == "image/pjpeg" //for jpeg, and jpg
$_FILES["fileField"]["type"] == "image/x-png" //for png

Hope that solve, and credit to MrDJK.

MrDJK commented: Thanks for elaborating more. (: +1
ko ko 97 Practically a Master Poster

Try this:

<?php 
  $year = 2011;
  $selectedYear = isset($_POST['year_nam']) ? $_POST['year_nam'] : $year; // If you use GET method use $_GET['year_nam'] instead of $_POST['year_nam'] 
?>
<select name="year_nam" id="year_nam">
<?php
  for ($yr_nam = 1950; $yr_nam <= 2020; $yr_nam++) 
  {
    $selected = ($selectedYear || $yr_nam == $year) ? " selected='selected'" : "";
    echo "<option value='$yr_nam' $selected>$yr_nam</option>";
  }
?>
</select>
ko ko 97 Practically a Master Poster

You can escape HTML from the PHP delimiter and echo the value in their specific '<td>'. Example below:

<? php
/* Shuawna Norris
June 13, 2011
Part two
Working with money
*/

$balance=55.75;
$newShirtCost=15.75;
$earns=20.00;
$bar=.55;
?>
<body>
<h1>Balance</h1>
<TABLE border=’1’>”;
<tr><td colspan="3">Starting balancebalance</td></tr>
<tr>
<td>Purchase: Clothing Store:<?php echo sprintf("$%2f", ($balance-$newShirtCost)); ?></td>
<td>ATM Deposit: <?php echo sprintf("$%2f", ($balance+$earn)); ?></td>
<td>Balance after split with wife: <?php echo sprintf("$%.2f", ($balance/2)); ?></td>
</tr>
</table>
</body>

This is more readable and easy to maintain.

karthik_ppts commented: helpful +4
ko ko 97 Practically a Master Poster

Post the error message you got.

vedro-compota commented: +++++++= +3
ko ko 97 Practically a Master Poster
<html>
<body>
<?php
 $A = floatval($_GET['n1text']);
 
if($A>=60)
 {
 
 echo "Congrats!!!<p>Grade1";
 }
elseif ($A <60 && $A >= 40)
 {
 
 echo "Grade2";
 } 
else  
{
 
echo "\n Fail";
} 
?>
</body>
</html>

Try with above. It works on my PC.

ko ko 97 Practically a Master Poster

<input type="text" value="n1text">

Replace above with below one:

<input type="text" name="n1text">
almostbob commented: good eyes zero +13
Zagga commented: Well spotted +5
ko ko 97 Practically a Master Poster

foreach($lines as $line){
$parts = preg_split("/:([^\/|^\\])/", $line);
$output .= "<tr>{$parts[0]}<td></td><td>{$parts[1]}</td></tr>";
}

Use below instead of above:

foreach($lines as $line){
$parts = preg_split('!\s*+[:]{1}\s!', $line);
$output .= "<tr>{$parts[0]}:<td></td><td>{$parts[1]}</td></tr>";
}

It should work. Hope this help.

diafol commented: a lesson in regex! :) +13
ko ko 97 Practically a Master Poster

Try with via Ajax.

almostbob commented: gentle, nice reply, I'm always ruder than that and upset people, +13
ko ko 97 Practically a Master Poster

Mail function does not work on localhost. If you want to test the mail function on your localhost, you need to setup the mail server on your machine. You can search on google.

ko ko 97 Practically a Master Poster
$dir = dirname(__FILE__);

$dir will have the current directory of the file. So, you can import the file you want from the current file. Here is some example.

include($dir.'../somedir/somefile.php'); //somefile.php under the somedir folder which is same root of the folder that the current php file was stored
include($dir.'somedir/somefile.php'); //somefile.php under the somedir folder which is same root of the current php file

Hope this help!

ko ko 97 Practically a Master Poster

I am not sure where do you want to insert the image. Insert image with message in Gmail, go to Gmail settings. Open the labs tab, there is a lot of application that can be working with gmail. Find 'Inserting images' and choose 'Enable', and then click 'Save Change', when you done with this setting, you can insert image into the gmail by clicking 'Insert Image' from the editor.
Hope this help !

ko ko 97 Practically a Master Poster

Put this line into your style

.form_enc div {
	
	overflow: hidden;
	
	margin-bottom: 4px;
}

.form_enc div input {
	
	float: left;

}

Set margin for the two input within 'form_enc_loc' and 'form_enc_data' for staying a little far from each.

.form_enc_loc input, .form_enc_data input {	
	
	margin-right: 3px;
}

You have one things to solve, 'enviar' link is not properly showing within the form and it is hidden by it's parent 'overflow:hidden' declaration.
Do you really need to set the static height for 'form_enc' ? Remove 'height' declaration or use 'min-height' for flowing the content normally inside it.
DIV is block-level and it takes 100% from its parent width and you always do not need to set the width for all block-level elements.

ko ko 97 Practically a Master Poster

$sql="insert into personal_ex(Personalexperience,Sex,Age,Sexuality) values ('$post[Personalexperience]','$post[Sex],$post[Age]','$post[Sexuality]')";

What is the '$post[]' ? Is it the php array or the HTTP_POST_VAR ? The correct use of the HTTP_POST_VAR is '$_POST' or '$_REQUEST'.

ko ko 97 Practically a Master Poster

Where '$_POST' var comes from? '$_POST' are always comes from via HTML form. Are you trying to show this page after submitting the form from the other pages.
Your codes are not wrong, but the logic is wrong. Print some value if the '$_POST' var has not defined.

<?php if ($_POST)
{
$nytt = ($_POST);

$oppdater = mysql_query("SELECT * FROM 'omoss' WHERE 'id'='1'") or die(Error);
$row = mysql_fetch_assoc($oppdater);

$gammelt = $row;

$querychange = mysql_query("
UPDATE omoss SET innhold='$nytt' WHERE id='1'
");
echo "

<form action='rediger_om.php' method='post'>
<textarea name='omoss' id='omoss'>$gammelt</textarea>
<input type='submit' value='Oppdater' id='oppdater' name='oppdater' />
</form>
";
}
?>

<?php	
	if (isset($_POST['Oppdater'])){
		$nytt = ($_POST['omoss']);
	
		$oppdater = mysql_query("SELECT * FROM 'omoss' WHERE 'id'='1'") or die(Error);
		$row = mysql_fetch_assoc($oppdater);
		
		$gammelt = $row['innhold'];
		
		$querychange = mysql_query("
					UPDATE omoss SET innhold='$nytt' WHERE id='1'
					");
?>			
		<form action='rediger_om.php' method='post'>
		<textarea name='omoss' id='omoss'>$gammelt</textarea>
		<input type='submit' value='Oppdater' id='oppdater' name='oppdater' />
		</form>
<?php
		}
	else{
?>
This text will show when the 'if' statement ignore.
<?php
	}
?>

Try with above codes. And you should use 'isset()' method for checking had the var already set.
By seeing you code, you may be trying to get the '$_POST' via submitting the form from the other pages. If it like so, you can use ($_POST != ''). If the '$_POST' is not null, the script run otherwise do other process as 'else' statement.

vedro-compota commented: good avatar) good answer) +1
ko ko 97 Practically a Master Poster

Your codes are non-standard and wrong syntax. You can't call two function with only one click event.
And also the variable are not matching (randomRed,randomGreen,randomBlue), I don't see these three variable defined. It must be (red,green,blue).
Try with below:

<html>
<body>
<form name="frmOne">
W2+: <input type="text" name="w" style="background-color:#123456;" size="5" value="0" />
<p>
Total Z: <input type="text" name="z" size="5" value="1" /></p>
<p> 
<input type="button" name="b1" value="Pluss One" onClick="calculate()" /></p>
</form>
<script language="javascript" type="text/javascript">
function calculate() 
{
A = document.frmOne.w.value;
A = Number(A);
C = A+1;
document.frmOne.w.value =  C;
document.frmOne.z.value = C+1;
return colourchange();
}
</script>
<script language="javascript" type="text/javascript">
function colourchange()
 {
	  var red=Math.floor(Math.random()*256)
	   var green=Math.floor(Math.random()*256)
	    var blue=Math.floor(Math.random()*256)

		document.frmOne.w.style.backgroundColor = "rgb("+red+","+green+","+blue+")";
}
</SCRIPT>
</body>
</html>

It should work. Hope this help!

Kniggles commented: thanks +1
ko ko 97 Practically a Master Poster

I have no special places or things and also I have no great books for studying CSS or HTML. All of my know about HTML and CSS are mostly based on practice.

I tried with googling and learned on some HTML, CSS websites. They gave me basic and foundation. I learned these sites and spent many times infront of my PC and wrote many codes and run on my PC.w3schools is greate place for beginners and HTML.net is also a good site for HTML and CSS.

You should start with trying to know about CSS properties and references and their structure. How their properties work and cross browser compatibilities and common errors that you will face with coding CSS.

You should know about the box model related with CSS http://css-tricks.com/the-css-box-model/. You should also know the CSS float property and how they cause the cross browser issues and how to fix that http://www.smashingmagazine.com/2009/10/19/the-mystery-of-css-float-property/, http://www.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/

You can find about DTD at here http://www.w3.org/QA/2002/04/valid-dtd-list.html.

One of the important thing is testing and practice what you found.

Hope that help...

vedro-compota commented: ++++++++++ +1
ko ko 97 Practically a Master Poster

I suggest you to try with the simplest layout. Below is my examples.

html, body {
	font: 13px Arial,Tahoma,Sans-serif;
	margin: 0;
	padding: 0;
}
h3 {
	font-size: 13px;
	text-align: center;
}
#wrapper {
	margin: 12px auto;
	width: 1024px;
}
#main-menu {
	background: #f0f0f0;
	border: 1px solid #d8d8d8;
	height: 60px;
	line-height: 60px; /* Set line-height same with height will give the equal vertical alignment */
	text-align: center;
}
#content {
	padding: 12px 0;
}
#columns {
	overflow: hidden;
}
#left {
	float: left;
	width: 287px;
}
#main_photo, #main_form {
	border: 1px solid #ddd;
	font-weight: bold;
	margin-bottom: 12px;
	padding: 87px 10px;
	text-align: center;
}
#middle {
	border: 1px solid #ddd;
	float: left;
	margin-left: 22px;
	padding: 13px 8px 87px;
	width: 432px;
}
#right {
	float: right;
	width: 250px;
	border: 1px solid #ddd;
}
#main_text_head {
	background: #e8e8e8;
	border: 1px solid #d7d7d7;
	margin: 0 0 9px;
	padding: 8px 3px;
}
#message {
	overflow: hidden;
	position: relative;
}
#avatar {
	background: #f7f7f7;
	border: 1px solid #d8d8d8;
	float: left;
	font-weight: bold;
	height: 111px;
	line-height: 111px;
	width: 117px;
	text-align: center;
}
#message_text {
	margin-left: 124px;
	padding: 8px 13px;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Что-то вроде страницы.</title>
</head>
<body>
	<div id="wrapper">
		<div id="main-menu">
			Main Menu
		</div>
		<div id="content">
			<div id="columns">
				<div id="left">
					<div id="main_photo">Main Photo</div>
					<div id="main_form">Main Form</div>
				</div>
				<div id="middle">
					<h3 id="main_text_head">Main Text Head</h3>
				</div>
				<div id="right">
					<h3>Right Side</h3>
				</div>
			</div>
			<div id="message">
				<div id="avatar">Avatar</div>
				<div id="message_text">Message</div>		  
			</div>
		</div>
		<div id="footer">
		</div> …
vedro-compota commented: Who else so helped me?)) +1
ko ko 97 Practically a Master Poster

Add 'position: relative' and 'z-index' property to the table cell greater than 'biographyphoto' z-index property. The example below has 10 for table cell 'z-index'.

#maintable td {
	position: relative;
	z-index: 10;
}
ko ko 97 Practically a Master Poster

Many absolute positions. Absolute position is not good for layout formatting. It should use for creating dynamic contents and creating HTML DOM element with browser scrptings (javascript, vbscript, etc).

Absolute position moved absolutely from it's parent or document. It left no space and it parent's cannot render correctly.

You should use exact height instead of minimum height calculating maximum heights of absolute elements inside it.

ko ko 97 Practically a Master Poster

'display: inline-block' would render the content according to the size of the content inside it.

vedro-compota commented: +fromvedrocompota +1
ko ko 97 Practically a Master Poster
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Put DTD in your document. IE need DTD to support 'inline-block' property.

Lapixx commented: Really solved my problem. Thanks! +1
ko ko 97 Practically a Master Poster

The problem must be your PHP codes. Check your PHP codes or post here.

ko ko 97 Practically a Master Poster
str_replace('<br />','<br>',$string);

Hope this help!

ahmedeqbal commented: helpful reply...! thanks Zero13 +2
ko ko 97 Practically a Master Poster

session_start() should always stay at the first line of the others.

<?php
session_start();

//some scripts after this line

?>
ko ko 97 Practically a Master Poster
ko ko 97 Practically a Master Poster
header("Location: add.php");

I am not sure that is the one you want. Hope this help..!

ko ko 97 Practically a Master Poster

Use 'class' or 'id' instead of 'attribute' (input[type]). This may ignore in some of IE version.