Jump to content


  • Posts

  • Joined

  • Last visited

About ckrudelux

  • Birthday 10/25/1989

Previous Fields

  • Languages

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Location
  • Interests
    Problem solving, Driving and Being creative

ckrudelux's Achievements

Invested Member

Invested Member (3/7)



  1. Php is on the server side and can only send data to the client. If you want to delay output or make anything after the page has been loaded javascript is the language to use. It runs on the client side and can manipulate the page after loading
  2. Yeah, since in your example you have a string witch both have text content and data content. You will have to seperate the two part some how. Either by having them in two different variables, remove parts of the string or to split it. There are several ways to do this. $txt = 'A long string'; $datastr = '1,2,3,4,5'; echo $txt . $datastr; explode(',',$datastr);
  3. Say what? php requires a dilimiter then exploding if you have a long.string you will need to extract the data portion before exploding the string into an array $txt = 'A long string 1,2,3,4,5'; explode(',', $txt); outputs an array like this: ['A long string 1', '2', '3', '4', '5'] You can use functions like substr to extract the string protion you need before you use explode to remove unwanted text.
  4. Hm, looked at my own files and noticed that I have this in the top. Does it solve the issue? I think I gave up trying to find what was wrong and just tried this and left it like that. <?php error_reporting(E_ALL); ini_set("display_errors", "on");
  5. Maybe it's an error reporting level. My code doesn't halt if I echo something that doesn't exist. If I rember correctly I think I had some similar issue until I change the error reporting level. This is also a neat trick in php 7 like isset but without all the extra work echo $var ?? 'default value';
  6. Nothing wrong with the code above (Just not so reusable). To think of is: that user input don't go raw in the SQL query (mysqli or PDO makes that easy) and not outputting raw user input/data to the browser by using for example htmlentities function.
  7. ckrudelux

    System shop

    We won't do the work, but we can guide you and help you with finding out where the problems are. I'm guessing cause you didn't post any code. You don't have any PHP knowledge so start to read about PHP and how that works. You should be able to figure out by your own how to build what you want after that. If you have an issue related to your code or coding practice we are here to help. Good luck
  8. In php you get the URI params by the $_GET variable. In your case you would use $_GET['model'] in php to get the value of model value.
  9. If it's something simple why not just simply make PHP draw a image that looks like the HTML output. If you want take a screenshot of the whole site, it's going to be a different story, might be web services you can use. To capture the screen you could make a bash script taking a screen shot of the server entering the site.
  10. ckrudelux

    System shop

    Try writing in English and people might be more interested in helping out with what ever problem your are facing.
  11. You should use htmlentities before displaying it on the page, not before you add it to the database. The database needs escaping so it won't interfer with your query.
  12. @ means that it suppress any error triggered by that expression. https://www.php.net/manual/en/language.operators.errorcontrol.php
  13. ckrudelux

    Php Exceptions

    To answer my own question remember the namespace. This will make things work much smoother
  14. ckrudelux

    Php Exceptions

    Should it matter from there I catch an exception? This works and catches the PDO exception from users $dice = new Dice(); try { $dice->create('Controller'); }catch(Exception $e){ } Try to catch the exception in the controller wont work class Controller { public function __construct(Users $users){ try{ $users->create('username','password'); }catch(Exception $e){ } } }
  15. How would I unset a cookie with an unknown path? What I'm trying to do is to automate the task of removing the session if nothing is stored in the session variable. But I'm trying to implement so that I could use different sessions in different folders which makes the path more or less unknown. I know this might not be a good way of doing it but still I'm curious to know.
  • Create New...