Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Common PHP Mistakes Beginners often make
Search
Giorgi
February 05, 2016
Technology
47
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Common PHP Mistakes Beginners often make
Laravel Meetup Georgia 2016 #1 Speech
Giorgi
February 05, 2016
Transcript
8 slides
Common PHP Mistakes Beginners Often make
Using mysql extension 1 $c = mysql_connect("host", "user", "pass"); 2
mysql_select_db("db"); 3 $res = mysql_query("SELECT * FROM tb LIMIT 1"); 4 $row = mysql_fetch_assoc($result); 1 $mysqli = new mysqli("host", "user", "pass", "db"); 2 $res = $mysqli->query("SELECT * FROM tb LIMIT 1"); 3 $row = $res->fetch_assoc(); Deprecated! Secure Reliable Fast
Not Using PDO 1 $sth = $dbh->prepare 2 ('SELECT *
FROM fruit WHERE foo < ? AND bar = ?'); 3 $sth->execute(array(150, 'baz')); 4 $bazs = $sth -> fetchAll(); • Practical OOP Syntax • Support of PostgreSQL, MS SQL, etc. • Can Inject fetched data directly into a new object
Not Rewriting URLs https://stupidblog.org/post.php?id=1337 https://stupidblog.org/posts/1337/kardashyan-shit-again/ • SEO • User friendly
• Neat
@Suppressing errors Warning == Fatal Error @ == code might
suck but I just don’t care
Not validating User input, Sessions, Cookies 1 mysqli::real_escape_string ( $foo
); 2 htmlspecialchars( $bar );
“Screw this, I’m gonna use laravel”
Thanks! Contact me: Giorgi Bagdavadze
[email protected]
Other Decks in Technology
See All in Technology
技術書典で本を売る流れ
yoshimura_datam
0
140
OWASP AI Agentic Top10に準拠するクラウドネイティブなガードレールの実践(CNDW 2026)
keitah
1
450
Webメール開発を大幅に変えたJMAPというゲームチェンジャー
tascript
1
330
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
4
2.1k
サーバーラックは作る時代! 3Dプリンターで作る10インチラックのススメ
jacopen
2
520
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
3
490
ワークフローからハーネスへ — Web フレームワークの作者たちが AI エージェントに向かう理由
azukiazusa1
2
1.5k
[DBRE Summit 26] DBRE はデータベース運用をどう変えたのか
_awache
0
130
AI-Ready なデータ基盤ってなに? & 新卒未経験が、いま考えていること
imuta
0
1.1k
AWS Client VPNの設定でハマったポイントとその過程での気づき
amarelo_n24
1
440
AWS re:Invent 2026 FSI Pre-Event Networking Night
junjikoide
0
220
AWS Well-Arhitected Frameworkセキュリティの柱 について
miu_crescent
PRO
2
260
Featured
See All Featured
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The Cost Of JavaScript in 2023
addyosmani
56
10k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1.1k
A Tale of Four Properties
chriscoyier
163
24k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520
Building the Perfect Custom Keyboard
takai
2
970
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
570
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Bash Introduction
62gerente
615
220k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k