Jump to content

oni-kun

Members
  • Posts

    1,984
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by oni-kun

  1. The most un-taxing and efficient method would be to use substr. echo $row['firstname'] . substr($row['lastname'], 0 , 1) . "."; //John S.
  2. It'd help to know about your server. What I'd really recommend doing is just writing <?php phpinfo(); ?> into a new file and viewing it. It'd display everything they've done to the server and provide the much needed relevant information. What version of PHP are you now at? Is register_globals on when seeing the config?
  3. Why not read the documentation provided? Can't be that hard. $result = mysql_query($sql,$conn) or die("Could not execute query: ". mysql_error());
  4. Depends (in most cases) purely on the license that they place the code into. Generally if otherwise not stated it is public domain (IE: Thy don't claim copyright on page or in code or in their tos), but as you'll see most scripts will release their code under GPL (which is free to take the code into your own use, and be able to call it yours and be released usually under the same circumstances) http://www.gnu.org/licenses/quick-guide-gplv3.html Just look in the respective documentation for the release, either on site or usually included with the script itself, and you can know your legal limitations.
  5. Just remember, if you're using absolute paths (ie: http: //yoursite.com/includes/a.php) you will lose all included functions and variables, as it will pull the results (from an http request) rather than actually including as intended. You can simply list the document path first, in place of an absolute path (which is more preferred) like so: $docroot = getenv("DOCUMENT_ROOT"); include($docroot.'includes/a.php'); which will pull something such as /usr/var/name/ht_docs/includes/a.php.
  6. I assume you're a beginner from how you're running in to that specific problem. BUT. Is the <head> data placed there by form, or FTP? If it appeared there out of nowhere, most likely someone used an XSS attack, or physically found a security hole and modified your files. If you're wanting to get rid of it from a form, use the strip_tags function, else change your passwords...
  7. Nope. The action tag sends POST data, GET data, or calls a js event. AJAX will (easily) be required to send the POST/GET data to your PHP function, keeping it on the same page though. AJAX isn't too hard.
  8. It's hard for someone else to have a random script of that by chance. What are you looking for it to do? If you're wanting for a menu or form to be outputted into an IFRAME, with HTML you can put the form as target=iframe. <a href="http://www.yahoo.com" target="iframe">Yahoo.com</a> | <a href="http://www.aol.com" target="iframe">AOL.com</a> | <a href="http://www.lycos.com" target="iframe">Lycos.com</a> | <a href="http://www.altavista.com" target="iframe">AltaVista.com</a> <p> <iframe name="iframe" width="600" height="400" src="http://www.yahoo.com" frameborder="3" scrolling="yes" > </iframe> Anyway.. this is more an HTML question.
  9. Yes yes, I used to browse them randomly to find interesting entries like these.
  10. This is sort of out of the scope for a PHP help question. Why not use this magical site to find the oh so many answers to your question already nicely written?
  11. Rofl. Anyway, OP, I'd recommend you pick an indent style and stick to it. http://en.wikipedia.org/wiki/Indent_style Your code is very messy. But there's nothing we can tell you, it's not our code, It's sort of hard to sift through it when we don't know how it works. It's so general.
  12. Love 'em. Awesome job nrg_alpha <?php print "!!!!!!!!!!!!!!!!!!!!!!"; //Ftw! ?>
  13. oni-kun

    PHP/CSS

    Yes, you are very right there. This is a PHP help forum. Well, you have some interesting friends.
  14. Well, sort of useless to ask this. You can always ask for a tutorial to be made but there may be a good chance it wouldn't be needed.
  15. I prefer to keep it PHP just to keep it all tight and in one package. JS is not to be relied on. I'd classify ajax navigation and all that into the 'fancy, but useless' part in mind.
  16. Yeah. What i'd recommend is go for a tutorial that tells you the proper concepts, and security practises. It'd be much more recommended than just looking at a good 'example', you may think it's a good way (it is for a lot of reasons) but , it lacks explaination of how it is composed.
  17. If you would have looked at the documentation as mentioned more than one time..
  18. Yep. extract will create variables out of the array itself, it's what you're looking to do.
  19. There's absolutely nothing you've given us to help you with, that's why he started going off-topic. Your code is completely correct and should work (under almost any circumstance) unless it is a problem with your server, such as, your cookie is being invalidated because of paths as mentioned by the other parameters you could set with the cookie.
  20. i understand how the function works. this works, which is why i never pointed out the space earlier: header("Refresh: 5; url= http://www.yahoo.com"); so i don't know what was going on with your code. But remember, he mentioned it's his phone, so you can safely assume it is less robust at fixing typos as so.
  21. You should check, it's a simple error! $filler3 = "<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">"; Notice how your quotes aren't escaped? The syntax highlighter shows you as well. If you want to keep them double quotes, wrap your filler text in single quotes like so: $filler3 = '<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">'; And fixed
  22. Why not check the documentation for setcookie and read common problems associated, and check out the extra parameters. Also , physically checking for the cookie's existence would help to check function.
  23. Yes, I believe proper practices are now subconscious, so just code on and on and on until you create a painting of code. (sounds like a good plot for a movie..)
  24. Umm, If you're scraping links they'd become links after displaying them? What is your code? You're doing nothing but displaying a website to us without any relevant code.
×
×
  • 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.