Jump to content

per1os

New Members
  • Posts

    3,095
  • Joined

  • Last visited

Everything posted by per1os

  1. Yea, I had the same issues you did too till I found a script that properly used it and hi-jacked it. For that TinyMCE this is the code I used to get it working <script language="javascript" type="text/javascript" src="wysiwyg/jscripts/tiny_mce/tiny_mce.js"></script><script language="javascript" type="text/javascript">tinyMCE.init({ mode : "textareas", theme : "advanced", plugins : "save,emotions,preview,searchreplace", theme_advanced_buttons2_add : "preview,forecolor,backcolor,search,replace,emotions", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center"});</script> Accordingly the code must be where the src points to. EDIT: Looking at the code maybe try this: // Output a form textarea field w/fckeditor function tep_draw_fckeditor($name, $width, $height, $text) { include_once('fckeditor.class.php'); // name of class $oFCKeditor = new fckeditor($name); $oFCKeditor->Width = $width; $oFCKeditor->Height = $height; $oFCKeditor->BasePath = '/fckeditor' ; $oFCKeditor->Value = $text; $field = $oFCKeditor->Create($name); return $field; } I am not sure if that will make a difference, but yea at least this way you know the file is included at least once. --FrosT
  2. // int fwrite ( resource $handle, string $string [, int $length] ) $fp = fopen($filename, 'w+'); fwrite($fp,"Some text"); http://us2.php.net/manual/en/function.fwrite.php Sometimes knowing the correct parameters to pass can help out a ton. Use www.php.net as a reference for that type of stuff. --FrosT
  3. $dirname = str_replace("replacewhat", "replacewith", trim(stripslashes($_POST['directory']))); if (empty($dir)) { // argument here }else { //procedure here } --FrosT
  4. per1os

    ODBC

    Have you tried saving it and see what the output produces? --FrosT
  5. http://us2.php.net/manual/en/function.session-id.php Use the session_id($SID) to set the session Other than that I am not sure, I never came across that problem. But I also have my php configured not to append the session id onto urls, maybe that has something to do with it. --FrosT
  6. per1os

    ODBC

    In the apache httpd.conf is .php recognized as an extension? --FrosT
  7. The bad part is the newbies will not read the system and still just ask for help. It is easier to ask the question than to investigate it yourself. --FrosT
  8. function file_get_contents2($filename) { $fd = fopen("$filename", "rb"); $content = fread($fd, filesize($filename)); fclose($fd); return $content; } try that --FrosT
  9. http://tinymce.moxiecode.com/ I would try that out, a great WYSIWYG editor. --FrosT
  10. <?php require_once('Connections/TCO.php'); $get_memberdetails_sql = "SELECT * FROM Wishlists WHERE Username = '{$User}'"; $result = mysql_query($get_memberdetails_sql); if (mysql_num_rows($result) > 0) { echo "The following destinations have previously been saved to your travel wishlist:"; while($thisrow = mysql_fetch_row($result)){ switch(strtolower($thisrow['Destination'])){ case "south africa": echo "<p><a href=\"africa.php\">South Africa</a></p>\n"; break; case "greece": echo "<p><a href=\"europe.php\">Greece</a></p>\n"; break; case "amsterdam": echo "<p><a href=\"europe.php\">Amsterdam</a></p>\n"; break; case "india": echo "<p><a href=\"asia.php\">India</a></p>\n"; break; default: echo "<p>You have never added any destinations to your wish list. To add some destinations, please add them through the <a href=\"holidaysearch.php\">Holiday Search</a> feature.</p>"; break; } } } ?> Also from the very first post, you may want to learn some html buddy. Made the case switch to lowercase incase there is a difference in the database. --FrosT
  11. Your not setting a path or domain. That needs to be done, see php.net and setcookie for correct usage. --FrosT
  12. If you are using PHP why not do this Applet 1 <input type="radio" checked name="c1" value="1"> Applet2 <input type="radio" name="c1" value="2"> if (isset($_POST['c1'])) { if ($_POST['c1'] == 1) { print '<applet>applet 1 code goes here</applet>'; }elseif ($_POST['c1'] == 2) { print '<applet>applet 2 code goes here</applet>'; } } --FrosT
  13. There are no benefits to it, there is a disadvantage, that anyone can see your code by going to .inc. I would name them as .php so that the code stays hidden from viewers. --FrosT
  14. echo "<TR><TD><a href=CreateQuote.php?Offer=".$row["Row_No"]."&Day=".$row["revised_date"]."&FromA=".$row["Departure"]."&ToA=".$row["ArrivalPoint"].">Quote</a></td>"; try that. --FrosT
  15. http://us2.php.net/manual/en/ref.mail.php Read that, it allows you to set up a smtp server, thats what you need. --FrosT
  16. Either type or read is a reserved word in MySQL to fix this one of 2 things, rename them to something different or add `columnname`, `columnname2` to all your column names. Remember it is ` not single quote ' --FrosT
  17. $total_num = mysql_result ( mysql_query("select count(*) as nr from feedback where rec ='".$_SESSION['id']."' GROUP BY memberid") ,0,"nr" ); replace memberid with the column name of how you track members. --FrosT
  18. If there are more than X characters, echo [string with more link] Else, echo [string without more link] if (strlen($string) > $xChar) { print "More Link here"; }else { print $string; } --FrosT
  19. Just an fyi: if ($problem == TRUE) { $content .= 'Errors:<br />'; } is better stated like this: if ($problem) { $content .= 'Errors:<br />'; } No need to set it == TRUE as the if statement will recognize it on it's own. Also I would add this: mysql_query($query) or DIE(mysql_error()); So you know if there is an error there. --FrosT
  20. Yea, according to what I know it is not possible, why do that anyways? --FrosT
  21. function adddate($date, $days) { list($year, $month, $day) = split("-", $date); //http://us2.php.net/manual/en/function.mktime.php //mktime ( [int $hour [, int $minute [, int $second [, int $month [, int $day [, int $year [, int $is_dst]]]]]]] ) $time = (mktime(0,0,0,$month, $day, $year) + (60*60*24) * $days); return date("Y-m-d", $time); } --FrosT
  22. $listcount = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE laston >UNIX_TIMESTAMP() - 3600",$c)); $listcount = $listcount[0]; --FrosT
  23. My bad just saw that the space was intentional. Anyhow, I would remove the javascript:void0 from the href and put # and after the windo.open(); add return false; <a href="#" onclick="window.open('http://www.holycow.com.au/SR/media/price/H02.html\', \'win2\', \'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=600,height=150,directories=no,location=no); return false;">View Price</a> --FrosT
  24. if ($typerequest == "Please Select" ) $select1 = "selected"; if ($typerequest == "Individual" ) $select2 = "selected"; if ($typerequest == "Organisation" ) $select3 = "selected"; try that. --FrosT
  25. I would help, but I only use Apache, sorry bud. --FrosT
×
×
  • 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.