NetBüfe Tube Video
Hoşgeldiniz
Giriş / Kayıt Ol

Case 1 - Solving Willer's Bug ( Script's - PHP ,HTML) Forms , Indenting

Videoyu misafirimiz olarak izleyebilmeniz için kalan otomatik gösterim süresi: 5

Merhaba Sevgili Ziyaretçilerimiz;

NetBufe.Com Kazanç amacıyla kurulmamış ve ücretsiz yararlanılan bir sitedir. Video içeriklerinde yer alan reklamlar ile NetBufe.Com sitesinin hiçbir menfaat bağlantısı söz konusu olmayıp ilgili reklamlar videonun yüklü olduğu siteler tarafından veya videoların yüklü olduğu sitelere yüklemeyi yapan kişilerce eklenmiş reklamlardan ibarettir. 

Videoların paylaşıma açıldığı sitelerde yüklü videolar/video linkleri herhangi bir nedenle kaldırıldığında ve/veya kısıtlandığında/yasaklandığında sitemizde de ilgili videonun gösterimi otomatik olarak son bulmaktadır.

Telif Hakkı(Copyright Notice) Olabilecek Açık Kullanım İzni Verilmemiş Video Materyaller Hakkında Önerimiz İlgili Videoyu İzlemeyerek(Bu Yönde Materyallerin İzlenmesine Destek Vermeyerek), Resmi Olarak Satın Alıp İzlemeniz Yönündedir. 

Tarafımızdan Üyelerimizin sayfamız üzerinde ayrıntılı olarak yer alan tüm bu durumlara ilişkin bilgi ve gerekleri okuyup anladıkları ve kabul ettikleri varsayılmaktadır.

Sitemize ücretsiz ve kolayca üye olarak birçok video paylaşım sitelerindeki kendi videolarınızın linklerini ekleyebilir, Sık Kullanılanlar ve Çalma Listelerinize kaydedebilir ve üye olmanın diğer tüm ayrıcalıklarından üye sosyal alanınızda yararlanabilirsiniz. Video Linkleri Ekleyebileceğiniz Örnek Bazı Siteler

NetBufe.COM

Teşekkürler! Arkadaşlarınıza da öneriniz!

URL

Bu videoyu beğenmediniz. Dikkate alacağız!

Üzgünüz, sadece kayıtlı üyeler çalma listeleri oluşturabilirler.
URL


Ekleme Tarihi Çalma Listesi Sahibi: Data - Kategori: BİLİM & TEKNOLOJİ & WEB & SCRIPT
2,180 İzlenme

Açıklama

Case Study - Solving willer's case
Concepts Involved - Form elements , code indenting ,conditional logic
Level - Basic

Willer wrote that his PHP script was bugging out ....on careful analysis i could observe that the error he was getting was of undefined index ...since the script printed by him on screen was only for PHP coding , i was sure that the error was in the form that was sending the values to the PHP script .....like guessed , i saw that his form element had value nom whereas he was checking for nom_ctr in the the PHP script ...the error became more critical because it formed the condition of a if loop which would now always evaluate to be false because the the condition of the if loop would never hold good .....Once i corrected this , i then proceeded to check whether the code had syntaxical error and you bet it did ....this is where i think proper code indenting play's a major role ...in his code , i could see that the parent if loop and the nested if loop containing yet another subnested if loop were all lost in braces ----this is again terrible because incorrect opening and closing of braces especially with conditional operators can wreak havoc on code and that is what it did in his case ---the compiler would never get a chance to travel to the subnested loop where the database connection and the query stood ....obviously then , the code will never work .

So , i did 2 things , firstly i changed the form element to match the variable being checked in the logic script so that names and indexes remain in unity
Second , i indented his code to observe proper logic flow and i could easily see the 4 places where he went wrong (even 1 place makes the code go wrong , so 4 is icing on the cake)
But once i did that and created a database replicating his same scenario , it was joy to see the code work .

Carry knowledge and understand the concepts .....the day there is peace in the world , i shall be a very happy man ,

Cheers ,

Amlan (flirt by nature , coder by passion)

Yorum Yazınız

Yorumlar

Henüz yorum yapılmamış. İlk yorumu siz yapınız.
RSS