Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 17:30

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



php - current online user/besucher

Discussion on php - current online user/besucher within the Web Development forum part of the Coders Den category.

Reply
 
Old 06/29/2016, 17:50   #16



 
Shawak's Avatar
 
elite*gold: 0
The Black Market: 259/0/0
Join Date: Apr 2010
Posts: 10,289
Received Thanks: 3,613
Gibt es einen Error?

Code:
print_r($stmt->errorInfo());
Shawak is offline  
Old 06/29/2016, 18:04   #17
 
elite*gold: 0
Join Date: Dec 2014
Posts: 276
Received Thanks: 84
Quote:
Originally Posted by Shawak View Post
Gibt es einen Error?

Code:
print_r($stmt->errorInfo());
Code:
 $stmt=$cn->prepare("UPDATE `benutzer` SET status='Online' WHERE username=:username");
    $stmt->bindParam(':username',$result['name'],PDO::PARAM_STR);
    $stmt->execute();
    print_r($stmt->errorInfo());
Gibt aus. Array ( [0] => 00000 [1] => [2] => )

Ui. Also der Fehler lag wohl daran, das ich anstatt $result['username'] - $result['name'] genommen habe. (Ich war schon ein wenig weiter...)

Wie ist das mit sql-injections,ist die seite einigermaßen sicher mit :
Code:
$cn = new mysqli($servername,$db,$pw,$userdb);
$data = $cn->real_escape_string($data);
$data = htmlentities($data, ENT_QUOTES | ENT_HTML5, 'utf-8');
$return_str = str_replace( array('<','>',"'",'"',')','('), array('<','>','&apos;','&#x22;',')','(','&sem','&bso','&so','&bs','&eq'), $data );
$return_str = str_ireplace( '%3Cscript', '', $return_str );
$data = $return_str;

return $data;
+
Prepared statements + PDO ?
.Barone is offline  
Old 06/29/2016, 19:09   #18



 
Shawak's Avatar
 
elite*gold: 0
The Black Market: 259/0/0
Join Date: Apr 2010
Posts: 10,289
Received Thanks: 3,613
Um einigermaßen sicher zu sein reicht es schon Prepared Statements zu nutzen, du musst halt nur schauen wie du dann anschließend mit den Daten in der Datenbank umgehst (Stichwort XXS).

Außerdem könntest du dir mal PHPs anschauen, meiner Meinung nach ist das eine super Methode.
Shawak is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Selling] Mehr Besucher auf deiner Website! 1000/0,60€ 10x500 Gratis Besucher!
05/31/2014 - Trading - 5 Replies
Ihr wollt mehr Besucher auf eurer Website? Dann seid ihr hier richtig! 1000 Besucher für 30 Cent! Sind das fake Besucher mit Bots? NEIN! Es sind echte Besucher die eure Website wirklich anschauen! Sie bleiben mindestestens 20 Sekunden auf eurer Website! Was lässt sich damit erreichen? Ihr wollt z.B. mehr views auf euren YouTube Video? Kein Problem! Mehr Aufrufe auf eurer Homepage mit Ads? Auch kein Thema! Es sind echte Leute die eure Website anschauen und ggf. auch Werbung...
The Elder Scrolls Online: FAQ about current State of Knowledge
08/04/2013 - Gaming News - EN - 2 Replies
Many mysteries cloak around "The Elder Scrolls Online", but some of them have already been unveiled by now. This game is currently in closed beta phase, where everyone who's interested is able to register on the official Internet website. Following information are yet known and public: What is The Elder Scrolls Online? The Elder Scrolls Online - also called TESO or ESO - is a coming MMORPG, which is being developed by Zenimax Online Studios and Bethesda Softworks. It was frequently...
Conquer Online current patch loader
12/16/2012 - CO2 Private Server - 6 Replies
how to create or build a loader for current conquer client ?
Is There Any Atlantica Online Working Bot With Current Version of Game ???
03/15/2011 - Atlantica Online - 2 Replies
Guys the current version of Atlantica online is 30414. I searched in forums and the newest bot is made like 1 year ago. I wonder if there is a working bot for this version. And if there is one, can you guys share this bot in here pls. Thank you very much, have a good day.



All times are GMT +1. The time now is 17:32.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.