
per1os
New Members-
Posts
3,095 -
Joined
-
Last visited
Everything posted by per1os
-
I feel so silly for asking this but I need a little PHP help
per1os replied to angelkelly's topic in PHP Coding Help
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 -
// 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
-
$dirname = str_replace("replacewhat", "replacewith", trim(stripslashes($_POST['directory']))); if (empty($dir)) { // argument here }else { //procedure here } --FrosT
-
Have you tried saving it and see what the output produces? --FrosT
-
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
-
In the apache httpd.conf is .php recognized as an extension? --FrosT
-
Help To Create a Objective Document based PHP HELP SYSTEM
per1os replied to sushant_d84's topic in PHP Coding Help
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 -
function file_get_contents2($filename) { $fd = fopen("$filename", "rb"); $content = fread($fd, filesize($filename)); fclose($fd); return $content; } try that --FrosT
-
I feel so silly for asking this but I need a little PHP help
per1os replied to angelkelly's topic in PHP Coding Help
http://tinymce.moxiecode.com/ I would try that out, a great WYSIWYG editor. --FrosT -
<?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
-
Your not setting a path or domain. That needs to be done, see php.net and setcookie for correct usage. --FrosT
-
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
-
How do i configure my localhost machine to send email via my isp.
per1os replied to sayedsohail's topic in PHP Coding Help
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 -
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
-
$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
-
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
-
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
-
Yea, according to what I know it is not possible, why do that anyways? --FrosT
-
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
-
$listcount = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE laston >UNIX_TIMESTAMP() - 3600",$c)); $listcount = $listcount[0]; --FrosT
-
PLEASE HELLLP! Parse error: syntax error, unexpected T_STRING
per1os replied to lukeh's topic in PHP Coding Help
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 -
if ($typerequest == "Please Select" ) $select1 = "selected"; if ($typerequest == "Individual" ) $select2 = "selected"; if ($typerequest == "Organisation" ) $select3 = "selected"; try that. --FrosT
-
I would help, but I only use Apache, sorry bud. --FrosT