Jump to content

text alignment,font,color bar


scarezekiel

Recommended Posts

thx man..ive managed to put the bar..but now it doesnt update anymore..

this is my code

 



<html>

<head>

<script type="text/javascript" src="../administrator/page/nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>

<meta http-equiv="refresh" content="600">
<style type="text/css">
A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {font-size:24; color: red;}
</style>


<script language="JavaScript">
function validate(){

companyname=document.frmpsedit.companyname.value;
  if ((companyname == '')){
  alert('Invalid Company Name');
  return false;
  }


}

  
</script>



</head>
<br/>
<table cellspacing="4" border="0" bordercolor="#C8BBBE" bgcolor="">

<br>
<?

if ((isset($_POST['id'])) && (is_numeric($_POST['id']))) {
   $id=$_POST['id'];
} elseif ((isset($_GET['id'])) && (is_numeric($_GET['id']))) {
   $id=$_GET['id']; 
} else {
   echo "error";
}
$connection=mysql_connect("$servername", "$username", "$password")
or die("Could not establish connection");
mysql_select_db($database_name, $connection)
or die ("Could not select database");
$query="select * from master_ps
		WHERE ps_id='$id'";
$result=mysql_query($query);
while($row=mysql_fetch_array($result)){
$companyname= $row['company_name'];
$companylink= $row['company_link'];
$logofilename= $row['logo_filename'];
$companydescription= $row['company_description'];
$filepath=$logo_dir."/".$logofilename."?".time() ;

}

echo "<font color=\"#000000\" size=\"2\" face=\"verdana,arial\" ><strong>Edit Partner / Sponsor</strong> </font> <br><br>";
echo "<form name='frmpsedit' enctype='multipart/form-data' method='post' action='index.php?action=ps&menu=update' onSubmit='return validate()' ";


echo "<tr><td valign='top'>Company Name $star:</td><td><input type='text' size='55' name='companyname' value='$companyname'></td></tr>";


echo "<tr><td valign='top'>Link :</td><td><input type='text' size='55' name='companylink' value='$companylink'></td></tr>";

echo "<tr><td valign='top'>Description :</td><td> <br><textarea  name='companydescription' style=\"width: 450px; height: 100px;\">$companydescription</textarea><br><br></td></tr>";

echo "<tr><td valign='top'>Current Logo :</td><td><img src='$filepath' width='50%'> </a></img></td></tr>";



$photo_upload_fields = "";
$counter = 1;


if( $_GET['$logocount'] )
$number_of_fields = (int)($_GET['$logocount']);
echo "<tr><td valign='top'>New Logo :</td>";
while( $counter <= $logocount )
{
echo "<td><input name='photo_filename[]' size = '55' type='file'/></td>";
$counter++;
}

echo "<input type='hidden' name='psid' value='$_GET[id]'>";
echo "<input type='hidden' name='logofilename' value='$logofilename'>";
echo "<br> ";
?>
<?

if(isset($_GET[id])){
echo "<tr><td><br/><input type='submit' name='submit' value='Update' onclick='return validate()'></td></tr>";}
else
echo "<tr><td><br/><input type='submit' name='submit' value='Submit' onclick='return validate()'></td></tr>";

echo "</form>";

echo "<tr><td><br/>$star indicates required field!</td></tr>";

?>

</table>
<?//echo "<hr>";?>
</html>

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.