Jump to content

Escee

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by Escee

  1. Escee

    MySQL error

    You've got the WHERE or ORDER clause between quotes: '" . $actionsql . "' Will be: FROM type 'WHERE type_id=3' Must be: FROM type WHERE type_id=3 So remove the quotes (').
  2. Escee

    asp 2 php

    Yeah, sure you can post it, what you thought the purpose of the forum was for?
  3. Escee

    database export

    Yes, can be done.. just open a table and click above in the menu 'export'.
  4. Escee

    Just Curious

    The -> is to access a method in a class. <?php class Example { public function Hi ( $param ) { return $param; } } ?> Then: $example = new Example;echo $example -> Hi ( 'Hee!' );
  5. You can't use PHP for that, but you can make a session which says there was or wasn't a post posted. Before the session expires the browser must be closed first..Something like this: <?php session_start ( ); if ( !isset ( $_SESSION [ 'post' ] ) ) { $_SESSION [ 'post' ] = false; } if ( $_SERVER [ 'REQUEST_METHOD' ] == 'POST' && !$_SESSION [ 'post' ] ) { // Do something $_SESSION [ 'post' ] = true; } else { // Form } ?>
  6. Escee

    Las Vegas Trip

    Yeah Just updated it.. thought I clicked the correct quote button
  7. On a Dutch forum I read something about this.. if you have a database with columns at this order:IdNameWebsiteYou must insert it also at this order like:NameWebsiteAnd not likeWebsiteNameI don't know if you got that right, but maybe that can be your problem. Just check it All through I'm not sure if this is true.. but give it a try
  8. Escee

    Button clicks

    If you don't want to refresh your page like the F5 way.. you can take a look at AJAX (Google some tuts & W3Schools tuts offcourse)
  9. Escee

    sha512

    Sha512 isn't supported by PHP (yet).. just use Md5 (only the easy way comparing with MrAdam's code ): md5 ( 'mypassword/string' );
  10. Escee

    Las Vegas Trip

    Which game(s), or just slots?
  11. Escee

    Fixed background image

    Yes.. but it can be made shorter (as above), so why use this much code?
  12. Escee

    BBCodes

    Well.. you can make BBCode work better when you use preg_replace. 'Cause when I type '[ /b]' with the str_replace method there will be a </b> in the source, or with '[ b]' only a never ending bold tag. preg_replace ('/\[b\](.*?)\[\/b\]/is', '<strong>$1</strong>', $str); When u use this, it'll only replace when there is a [ b]...[/ b] match Edit; @Topicstarter: You could make a function called 'bbcode' with the text as param, and return de text param, only replaced. Something like this: function bbcode ( $text ){ $text = preg_replace ('/\[b\](.*?)\[\/b\]/is', '<strong>$1</strong>', $text); // etc // etc return $text;}
  13. Escee

    Fixed background image

    Nope, doesn't matter (as you could see at the w3 site)
  14. Escee

    Fixed background image

    body { background: url('bg.png') top middle no-repeat fixed; } The middle could be center.. but try this
  15. I think he can implement that himself
  16. Do you have a mail server up and running?
  17. <a href="java script:history.go(-1)">GO BACK</a> Yep But if you're user is coming for Google or so, he will be returned to Google. But you can check on that with a if-statement if you want to
  18. Well.. it could be made very easy (just like this forums, only with a smaller layout and stuff), but who would use it? 'Cause internetting on your mobile is very expensive..
  19. Escee

    Redirect errors?

    You could use something like this: function my_include ( $file ){ if ( !include ( $file . '.php' ) ) { header ( 'location: error.php?type=include' ); }}
  20. Hi y'all, well I'm Stefan, currently eighteen years old and living near a city called 'Doetinchem', The Netherlands. Webdev is a great hobby of mine, also designing stuff, and I'm doing it for a year of three now. That's not my only hobby, I also like basketball and I'm busy with Hiphop music.Questions? Ask :)So far I like this forum, them Dutch forums are quite boring, not too much interesting topics ^^
  21. Escee

    MySQL query to XML

    Yes! I found the solution by accident, this can be done with DOM within PHP, if you're intrested, you can find the turorial here (heading 'Writing XML with the DOM'). <?php $books = array(); $books [] = array( 'title' => 'PHP Hacks', 'author' => 'Jack Herrington', 'publisher' => "O'Reilly" ); $books [] = array( 'title' => 'Podcasting Hacks', 'author' => 'Jack Herrington', 'publisher' => "O'Reilly" ); $doc = new DOMDocument(); $doc->formatOutput = true; $r = $doc->createElement( "books" ); $doc->appendChild( $r ); foreach( $books as $book ) { $b = $doc->createElement( "book" ); $author = $doc->createElement( "author" ); $author->appendChild( $doc->createTextNode( $book['author'] ) ); $b->appendChild( $author ); $title = $doc->createElement( "title" ); $title->appendChild( $doc->createTextNode( $book['title'] ) ); $b->appendChild( $title ); $publisher = $doc->createElement( "publisher" ); $publisher->appendChild( $doc->createTextNode( $book['publisher'] ) ); $b->appendChild( $publisher ); $r->appendChild( $b ); } echo $doc->saveXML(); ?> Something like this should do the trick :)Thanks anyway Boen_robot
  22. Escee

    MySQL query to XML

    Hmm.. indent the XML with XSL, that doesn't sounds quite logic I can indent the XML output with tabs or the PHP Tidy Class.. but I'm looking for a way to do it with some kind of SimpleXML thing.Oh, and yes, the code does work Try it ^^
  23. Escee

    what new logo??

    Maybe someone would make you a logo when you ask it nicely..?
  24. Try to initialize your session before you start doing stuff with it, like this: if ( !isset ( $_SESSION [ 'counter' ] ) ){ $_SESSION [ 'counter' ] = 0;}$_SESSION [ 'counter' ]++;
×
×
  • Create New...