scarezekiel Posted March 13, 2012 Share Posted March 13, 2012 ok so i need this kind of bar settings on my description box..problem is i dont know the code..help please Quote Link to comment Share on other sites More sharing options...
trq Posted March 13, 2012 Share Posted March 13, 2012 Assuming you want all the functionality as well, search for a WYSIWYG editor. There are plenty around. Quote Link to comment Share on other sites More sharing options...
scarezekiel Posted March 14, 2012 Author Share Posted March 14, 2012 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> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.