Jump to content


  • Posts

  • Joined

  • Last visited


Everything posted by Lamez

  1. tested, and worked, I was uploading the wrong page to the server, my bad!
  2. you could try it, just make a new folder on your server called test, then try it there.
  3. I am new to functions to start off with! Alright how do I call a function from another page? for an example <?php //poop.php function displayAll(){ echo "poop"; } ?> in my new page new.php <?php include ("poop.php"); displayAll(); ?> is that syntax right? I am not sure on how to do this.
  4. I found this! Thank you very much! <html> <head> <title>test</title> <script language="JavaScript"> <!-- function WinOpen() { var url=document.redirect.selection.value document.location.href=url } // --> </script> </head> <body> <form name="redirect"> <select name="selection"> <option value="#">Sort By...</option> <option value="viewmembers.php">All Members</option> <option value="viewmembers.php?sort=username">Username</option> <option value="viewmembers.php?sort=last">Last Online</option> <option value="viewmembers.php?sort=online">Online Only</option> <option value="viewmembers.php?sort=offline">Offline Only</option> </select> <input type=button value="Go!" onClick="WinOpen();"> </form> </body> </html> http://www.java2s.com/Code/JavaScript/Form-Control/DropdownRedirectSubmit.htm
  5. ya like here is my drop down box: <form id="sort" name="sort" method="post" action="action.php"> <label> <select name="select"> <option value="#">Sort By...</option> <option value="0">All Members</option> <option value="1">Username</option> <option value="2">Last Online</option> <option value="3">Online Only</option> <option value="4">Offline Only</option> </select> </label> </form> say they click All Members it the action will redirect them to the right page.
  6. Alright, once again sorry about my last post. Now I want to make a drop down list in html, which I have done, and I set the values from 0 - 5 as my action can I make it where it is is value 1 redirect to another page, and the same with the other values, I am not sure on how to go about this. I know I am going to have to write a IF statement. If you start the code I a can finish it. thanks again! ???
  7. omg, sorry for wasting your time I forgot a ; in my echo above the line, sorry thanks though now it shows if the user is on or off line!
  8. no that did not work at all. dang!
  9. what does this mean? I know it is saying I am missing a ; or a , but where? here is line 47, any help?
  10. oh sorry let me explain, I downloaded this WYSIWYG for my about box, a users profile, I also have a login script and what not. well what I am trying to do is let the editor add info from the box to the database, but if the database already has info put it in the text box, and let the user edit that. if pulls from table users, row about. $session->userinfo['about']; session is the current user logged in, userinfo is a function that pulls info from the database, on the row about.
  11. I found this code, it controls the whole editor and has the classes, I think. <?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2007 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the integration file for PHP 4. * * It defines the FCKeditor class that can be used to create editor * instances in PHP pages on server side. */ class FCKeditor { var $InstanceName ; var $BasePath ; var $Width ; var $Height ; var $ToolbarSet ; var $Value ; var $Config ; // PHP 4 Constructor function FCKeditor( $instanceName ) { $this->InstanceName = $instanceName ; $this->BasePath = '/fckeditor/' ; $this->Width = '590' ; $this->Height = '200' ; $this->ToolbarSet = 'Default' ; $this->Value = ''; $this->Config = array() ; } function Create() { echo $this->CreateHtml() ; } function CreateHtml() { $HtmlValue = htmlspecialchars( $this->Value ) ; $Html = '<div>' ; if ( !isset( $_GET ) ) { global $HTTP_GET_VARS ; $_GET = $HTTP_GET_VARS ; } if ( $this->IsCompatible() ) { if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" ) $File = 'fckeditor.original.html' ; else $File = 'fckeditor.html' ; $Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ; if ( $this->ToolbarSet != '' ) $Link .= "&Toolbar={$this->ToolbarSet}" ; // Render the linked hidden field. $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ; // Render the configurations hidden field. $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />" ; // Render the editor IFRAME. $Html .= "<iframe id=\"{$this->InstanceName}___Frame\" src=\"{$Link}\" width=\"{$this->Width}\" height=\"{$this->Height}\" frameborder=\"0\" scrolling=\"no\"></iframe>" ; } else { if ( strpos( $this->Width, '%' ) === false ) $WidthCSS = $this->Width . 'px' ; else $WidthCSS = $this->Width ; if ( strpos( $this->Height, '%' ) === false ) $HeightCSS = $this->Height . 'px' ; else $HeightCSS = $this->Height ; $Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\">{$HtmlValue}</textarea>" ; } $Html .= '</div>' ; return $Html ; } function IsCompatible() { return FCKeditor_IsCompatibleBrowser() ; } function GetConfigFieldString() { $sParams = '' ; $bFirst = true ; foreach ( $this->Config as $sKey => $sValue ) { if ( $bFirst == false ) $sParams .= '&' ; else $bFirst = false ; if ( $sValue === true ) $sParams .= $this->EncodeConfig( $sKey ) . '=true' ; else if ( $sValue === false ) $sParams .= $this->EncodeConfig( $sKey ) . '=false' ; else $sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ; } return $sParams ; } function EncodeConfig( $valueToEncode ) { $chars = array( '&' => '%26', '=' => '%3D', '"' => '%22' ) ; return strtr( $valueToEncode, $chars ) ; } } ?>
  12. ok well I just downloaded. I am not too sure, I have been reading this: http://wiki.fckeditor.net/ idk I will get it I guess
  13. ya but it does not call info from the database, it just outprints the php code. I need it to call info from the database! that is what is hard! thanks thought
  14. you are completely right line 71: if($form->value("about") == "")
  15. no I get the same error this is the code I have: $oFCKeditor = new FCKeditor('FCKeditor1'); $oFCKeditor->BasePath = '../style/include/edit/'; $oFCKeditor->Value = ( if($form->value("about") == "") $session->userinfo['about']; else $form->value("about"); 'not working either at the moment '; $oFCKeditor->Create();
  16. alright I have a WYSIWYG editor, and I am trying to implant it into my website. well I have this in my here is the code for the editor $oFCKeditor = new FCKeditor('FCKeditor1'); $oFCKeditor->BasePath = '../style/include/edit/'; $oFCKeditor->Value = 'text'; $oFCKeditor->Create(); here is the code I need to set as my value if($form->value("about") == "") $session->userinfo['about']; }else{ $form->value("about"); but when I copy that code above into the value I get this error: well I am not too sure on how to do this, any suggestions?
  17. gosh I am restarted, I am completely lost when it comes to JS, but I think I could have figured that out. Thanks again! Your Rock1
  18. alright on my website you are able to listen to music, and play games, well I have it where when you click on a link, weather it be music or a game, it opens it up in a new window. Well I tried playing music and playing a game and it does not work, if I click on the music first then click on a game it link the game will reload in the music window. here is the code I am using: <a href="javascript:void(0)"onclick="window.open('game.html','linkname','height=110, width=210,scrollbars=no')">Play Game</a> how can I fix this?
  19. I have not got all the features I want to add, but I have enough to get the idea of the website. www.lamezz.com Please tell me what you think overall!
  20. its not my type of style, but it still looks nice, it is not a template that would turn me off from viewing your site. well done.
  21. thanks guys! thank you very much! for a noob, this was probably my most dynamic PHP script on my own, and I was almost right! Thanks Again!
  22. well if you have it on your computer or your web server, and this is your only source of getting on the net, then you need to set it up a mailserver, but if you have web hosting then they have a mail server.
  23. no that is not what I am trying to do in the title bar I want it to call the variable. up on the title bar (if title equals to home) "Lamez's Corner - Home : Mozilla Firefox" I am not too sure if i was clear enough on my first post.
  24. alright, cuz I am lazy, and if one day I decided to change the title, I do not want to change tons of pages so I wanted started while I was ahead. I have a file, like most webmasters, called head.php in head it contains, well my header, and a little php snippet that says: <title><?php include ("style/include/cons/title.php"); ?></title> and in title.php: Lamez's Corner - <?php if $title = home{ echo "Home"; } elseif $title = login{ echo "Login"; } elseif $title = register{ echo "Register"; } elseif $title = member{ echo "Member's Area"; } elseif $title = admin{ echo "Admin's Center"; } ?> the reason why I am tell you this is because I want to type a variable in my HTML coding that will give the page a title for example: <?php $title == home; include "style/include/cons/head.php"; ?> well it did not work out, that is why I am posting here, I get this error: line three in title.php is: if $title = home{ I am guessing the main problem is I am not setting the variables right, or not calling the variable right. Any Help?
  25. ya I got it, I was looking at my index page and I made it include a file called side (note index.php has session.php included on it) so I looked in side, and it was calling for session also in session it calls for database. so I got it fixed thanks guys!
  • 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.