Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About gvp16

  • Rank
    Regular Member

Profile Information

  • Gender
    Not Telling
  1. gvp16

    Your basic project/ scripts

    Good adivce, thank you.
  2. I have been been coding in php for about 5/6 years. While at uni I was taught the procedural way, and using all the myql_ functions to do database work. Generally speaking if you google for php coding examples you tend to come across examples using those methods which I now believe are out of date. In recent years I have learned some MVC, and used some frame works and open source applications (opencart, wordpress etc...) So im just wondering, these days if you had to write a basic script to get information from a database how would you go about it? or say you were going to make a basic 5 page website with php how would you set it up? The reason im asking these questions is because I want to get out of bad habits and using outdated methods so rather than write something like the following what would you do? $dbh1 = mysql_connect('localhost', 'user', 'password') or die(mysql_error()); //DB connection mysql_select_db('db_name', $dbh1);//choose correct database $query = "SELECT * FROM table WHERE something = something"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($result); echo$row["field"]; How would you set up a basic website (content pages,contact form)? In the past I have done something this : request ---> index.php (get page & content from db) ---> pass info to content.php As i said im looking to get out of bad habits and essentially get up to scratch on modern day practices for basic projects, using a framework or CMS for such simple things seems like overkill. Thanks.

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.