Jump to content

MrMagic909

New Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MrMagic909's Achievements

Member

Member (2/5)

0

Reputation

  1. Hey @gizmola like i said earlier to @ginerjm, I will probably end up use a framework later on, just for the ease of use in larger scale apps, however for now I am writing a relatively simple app with 1 function/goal to it. I want to write a script / create a website where I can submit websites (that I add to the database as a user) to different types of ad sites i.e. classified ad sites, link directories, search engines, specialty ad sites etc etc But as I am used to mysql/myqsli for now I have to focus my attention on getting the whole PDO approach under my belt and then go from there. I have my own xampp running and setup a site with some basic code for homepage, login and registration and on my xampp it runs, however when I put it on a live server I get nothing but 500 error sooo gonna go dive in to that first thanks for the help bruddha
  2. Allright @ginerjm, got it! That's basically how I approach coding, in a modular way ie I create a piece of code that performs a certain function that gets used a lot. I might start using laravel or symfony just so I can escape writing all those pesky little subroutines like login, registration, password hashing, difficulty checking etc... I mean I presume those kinds of things have already been done to death by others and should/would be available in a framework, right ? I have a similar approach to displaying content, I use a function : echo (getContentByType("head1")); to display a header, pagecontent and footer, I will have to look into simplifying that to your approach where it displays the entire screen , introducing pre filled variables. I tried reading the pages on heredocs, barand sent through but as of yet it doesn't make a whole lot of sense to me ... I will need to read it couple more times I guess and perhaps reference some other sources. anyway thanks for the tips bruddha, much appreciated
  3. Hi @ginerjm, thanks for the reply, and YES I have started using PDO on advice from alumni & moderators here I started with a base mysqli but was advised to adopt pdo, so I am taking what I've already written into pdo territory. can you elaborate on the following : - included php modules to handle security checking - a bit of JS and a well-organized std. HTML template that I populate with php variables to create my page. - make good use of heredocs ?? I would like to understand more about how you organize these things, and I have no idea what heredocs are / is ? greets
  4. and by something else I mean things like CodeIgnitor or Laravel ....
  5. Hi everyone, I have a couple questions about approaches to coding First off, I am used to creating functions for certain tasks and putting them in a functions.php, now i've done stuff with classes in the past too ... but now with all the changes in PHP8 ..... What is the best way to go when using the PDO style ? Also I noticed I had created a db_connect.php that I include, but I also created a function to connect and close a database ... is this wise, and if not what is the best way to go about this ? thanks i.a. for any assistance
  6. Okay i've started diving in and already found that I was getting way ahead of myself with just connecting to the database ... sooooo .... here's a few questions I gotta / like to ask : First off, I am used to creating functions for certain tasks and putting them in a functions.php, now i've done stuff with classes in the past too ... so what is the best way to go when using the PDO style ? Also I noticed I had created a db_connect.php that I include, but I also created a function to connect and close a database ... is this wise, and if not what is the best way to go about this ? already stuck .. after just an hour lol or should I ask these questions in another board?
  7. Niice bruddha thanks for setting me up with with this sweet info, it will help me get to where I need to go much faster !! I will go over all that has been "spilled" to me here and adjust my code accordingly. Luckily I only came as far as the basics in writing the script, just registration/activation/login with all the neccesary checks for clean data and security ofcourse. If I have any issues in rewriting I will for sure be back to consult with you guys ... Thanks again y'all, much appreciated
  8. That is a buttload of intel to process bruddha @mac_gyver hhh Like I said i've been away from coding for a while so there's tons of stuff I gotta catch up on and your hints will def help smooth the path. Could you direct me to some intel on how to perform the actions you've mentioned, that would be of great help. And I do agree the mysql has always been inherently flawed even way back in plain mysql days, and as often is the case they only try to "repair" the flaws with additional flawed methods. So it's becoming painfully clear I have to step away from my habit of using MySQL and adopt to better protocols for handling databases. thanks
  9. Hey Barand, hahaha funny that you express it that way My understanding is that it has to do with two basically different approaches, nr 1 the procedural coding and 2 the object oriented coding method ? but I have to agree that for some purposes one method would be better than the other. I will probably try to mix the both ways together, seeing as I am quite the scatterbrain when I get into coding loool Got any good reference materials for doing it PDO style ?? ooops sorry didnt see the link before got it now, I will go study thanks mate
  10. and thank you for the warm welcome!
  11. Yes indeed, i did start to write some stuff using prepared statements, but through mysli. Can you explain a bit more about why PDO is better in this case?
  12. MrMagic's the name and Magic is the game. I used to do a bit of php coding back in the day but came to find that with PHP8 things have changed quite a bit, so i'm here to learn and pick up a few new tricks. I'm writing a script for a website and need some insights into the new way of working in php8. I want to make a robust and secure script that incorporates all the latest security mechanismes to prevent sql injections and all the other bad stuff Looking forward to meeting and talking to you all, well not all that would be a bit much but you get my drift, right ? Adios
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.