Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. They are not PHP Headers but PHP tags. The setting you are after is called short_open_tag It is recommend that you code your scripts with the full open tags (<?php ?>) and do not use the short tags (<? ?> or <?= ?>) in scripts. This will allow your scripts to be compatible on all servers.
  2. the ending HEREDOC delimiter must be on its own on the line with nothing else on it, including spaces. // Setup new template $template = <<<EOF — <a href="{\$mybb->settings['bburl']}/{\$config['mod_dir']}/index.php">{\$lang->welcome_mod}</a> EOF; Should be: // Setup new template $template = <<<EOF — <a href="{\$mybb->settings['bburl']}/{\$config['mod_dir']}/index.php">{\$lang->welcome_mod}</a> EOF;
  3. You need to enable the mysql extension in the php.ini. It is not to do with MySQL. It is to do with PHP's conifguration. This FAQ thread will be able to help you.
  4. Yes you can. Note the number must in secound. So 1 hour = 3600. if you want the cookie to expire after a week for example, then do this: time()+3600*24*7 3600 (1 hour) x 24 (24 hours = 1 day). Then times that by 7 to get the seconds in a week (7 days in a week). Its just basic maths
  5. Umm, cant seem to find it. However the only one I have is a tutorial for faux columns which is the technique you're trying to avoid. Umm just looked on alistapart.com and I think I found what you are looking for here.
  6. Dont work in IE(7) for me there jesi. For having same height divs I got a tutorial bookmarked somewhere, got to look through my mess of HTML and CSS bookmarks, need to sort them out.
  7. EDITED Do you still have a problem with the code? I notice in your code when you set the cookie you don't wrap the cookie name (first parameter for set_cookie) in quotes. You should wrap all strings in quotes unless you are using a constant. If you are using constants then they should be in uppercase (MYCONST). Also did a slight boobo with the code it should be this: // first login page: setcookie('email', $email, time()+3600, '/', '.koggdesigns.co.uk'); setcookie('password', $password, time()+3600, '/', '.koggdesigns.co.uk'); I forgot to add the () after time. So the cookies where invalid and thus it didn't work.
  8. DO not repost your code seivadeel I have wrap your code in code tags, but yeah please post the relevent parts as thorpes said. Also thorpe when posting bbcode syntax in the forum use the [nobbc][/nobbc] tags, so [nobbc] [/nobbc] will produce .
  9. Ooh hang on, I had a slight typo it should be eregi_replace not ergei_replace Before using this function read the document on it here
  10. Downloads for me are fine in firefox. Speeds are stable. It may not be firefox that is at faults with the inconsistent download speed it is reporting it could be the server being hit hard at that current time. Try downloading a large file of a reliable host.
  11. Try this instead: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>The Online Society</title> <link rel="stylesheet" type="text/css" href="default.css" /> </head> <body> <div id="header"> <h1>The Online Society</h1> <div id="menu"> <ul> <li><a href="#" class="current">Home</a></li> <li><a href="#">Forum</a></li> <li><a href="#">Games</a></li> <li><a href="#">Register</a></li> <li><a href="#">Contact</a></li> </ul> </div> </div> <div id="login"> <h3>Login</h3> <form action="home.php" method="post"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td valign="middle">Username:</td> <td><input type="text" name="email" class="txtbox" /></td> </tr> <tr> <td valign="middle">Password:</td> <td><input type="password" name="password" class="txtbox" /> </tr> <tr><td colspan="2"><input type="submit" name="submit" value="Login" class="btn" /></td></tr> </table> </form> </div> </body> </html> body { margin: 0px; padding: 0px; color: #999999; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 0.6em; } #header { background-image: url(images/top_bg.gif); background-repeat: repeat-x; height: 88px; } #header h1, #menu ul { margin: 0px; padding: 0px; } #header h1 { margin: 0px; padding: 30px 0 0 60px; font-size: 24px; float: left; } #menu { display: block; float: right; } #menu ul { margin: 0; list-style: none; } #menu li { display: block; float: left; white-space: nowrap; } #menu li a { display: block; padding: 57px 20px 12px 20px; text-decoration: none; color: #fff; font-weight: bold; } #menu li a:hover { background: url("./images/bg_menu.gif"); } #menu li a.current { letter-spacing: 1px; color: gray; background: url("./images/bg_menu.gif"); } #menu li a.current:hover { color: #fff; } #login { width: 300px; padding: 15px; } #login h3 { font-size: 16px; padding: 0; margin: 0; } #login input.txtbox { padding: 2px 8px 2px 8px; border: solid 0px #fff; margin: 3px; /* hieght: 20px; - no need to set the height. Let the padding do this. */ width: 184px; /* 16px offset remeber width = width + (LR padding + LR boarder) NOTE: LR = Left and Right */ background: transparent url("./images/textfield_bg.gif") no-repeat right top; } #login input.btn { border: solid 0px #fff; margin: 3px; height: 20px; width: 80px; background: transparent url("./images/textfield_bg2.gif") no-repeat center; }
  12. Also post the errors you are getting here in full aswell. When I go to the link provided I get no errors shown.
  13. What doesn't it recognise? ergei_replace or str_ireplace?
  14. Not really sure without see your script. Post the most relevant bits of code here.
  15. Order the id column in descending order and limit the results by 4. That will grab the 4 newest members from your table. SELECT * from `members_tbl` ORDER By id DESC LIMIT 4
  16. str_ireplace is only available for PHP5. You're probably better of using ergei_replace instead.
  17. You cant call functions within strings. Try this: echo '<a href="' . siteloklink($link,1) . '">download</a>';
  18. if you want your site cookies to work across subdomains you need to setup the cookie completely, the following should do: setcookie('email' $email, time+3600, '/', '.mysite.com') That will tell the browser to set a cookie called email with the value of $email, expire the cookie after an hour. Allow the cookie to be accessed site-wide and be used in sub-domains. Also make sure the browser is accepting cookies - very important that. Also session_start(); is not needed in your code as you appear to not be using sessions. Only cookies - which are not sessions.
  19. What do you want to change? Its not hard to unless you don't know HTML/CSS. Just lookin to the style HTML attribute and the font CSS element.
  20. If you looked in regex board you should find what you are looking for doing bold/italic and underlined bbcodes. for uploading just search for PHP file uploads and you should be able to find a tutorial to upload files with PHP.
  21. Attach the code here so we can see how you are using sessions.
  22. For the hostname localhost should be fine in most cases. The password is not for the database but for the mysql user you are using to login to MySQL. You have to setup the password for the user in phpMyAdmin by clicking the User privileges link on the main phpMyAdmin page you get when you login to phpMyAdmin.
  23. I agree, I will sticky it. I always use the cheat sheets at ilovejackdaniels.com
  24. htaccess file is basically an external configuration file for Apache which is read during run time (when viewing a directory/file on the server). With htaccess you can give each directory under the document root a different set of settings. htaccess files work on a per directory basis and all other subsequent folders are affected too, for example say your setup is this: c:\htdocs   |   +--folder1   |  |   |  |-.htacces   |  |   |  +--- sub-folder1   |  |   |  +--- sub folder2   |   +--- folder2 all files/folders in the htdocs folder will abide by the Apaches main configuration. However sub folder1 and sub folder2 inside folder1 and folder1 itself will also abide the configuration from the .htaccess file in folder1. folder2 will not be affected or any file/folder outside of folder1 For the ideal directory structure I install everything webserver related into the root of hard drive in a folder called Server. It looks like this: [code]C:\Server   |   +--- Apache2   +--- MySQL   +--- PHP   +--- www (this is where i store my files, not Apache2/htdocs)[/code] I have also got phpMyAdmin in the Server folder too and added an Alias to Apaches configuration so I can access it via the following url: http://localhost/pma
  25. ha, no problem. I'll mark this as solved.
×
×
  • 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.