Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP and MySQL for beginners?

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #28606
    MichaelR
    Member

    Hi, I was wondering if anyone knew where to get help on PHP and MySQL for literally basic beginners.

    I am very advanced at CSS, HTML and XHTML, and I know very basic PHP like variables etc. :)

    I would need the help to be very explanatory like what databases are about and how to use them.

    I know about NetTuts and Smashing and things Like CSS-Tricks however none of these have was I need. :?

    Thanks, Michael :D

    #73393
    MichaelR
    Member
    "TT_Mark" wrote:
    Hi Michael,

    Personally I learned from experimenting, basically just coming up with ideas and then working out how to code them in PHP using the PHP.net website.

    I never actually read a book and found trial and error the best way to learn

    Hi I would do this however I literally know nothing about MySQL, there is one big question you’ll laugh because you’ll find it stupid however I’m not sure how it works.

    You know if you were making your own CMS and and you make tables in Mysql and then to connect to the database you use like a config.php page how come every one who uses your script doesn’t have to create tables how do they automatically appear :S

    Thanks, Michael

    #73401
    Irrorate
    Member

    PHP: viewtopic.php?f=6&t=1721

    SQL: http://net.tutsplus.com/tutorials/datab … beginners/

    To answer your question, the tables inside the database are created on the server and the PHP script accesses the tables and does what is required (retrieve/insert/alter contents).

    The tables are there on the server once, but the PHP shows it to everyone who views.

    #73418
    blue642
    Member

    I believe what you may be trying to ask is how to create tables in MySQL with PHP… So that if someone "installed" your code, they wouldn’t have to build the tables themselves… (like with WordPress, or other CMS’s, you just create a DB, and it works, creating it’s own tables… (Forgive me if I misunderstood.)

    Firstly, I have been reading the following 2 books, which I would recommend…

    http://www.sitepoint.com/books/phpant2/
    http://www.sitepoint.com/books/phpmysql4/

    (Chris & Mods, forgive me if I shouldn’t link to a store…)

    anyhow, they are both great resources to get you going…

    As far as a specific code sample something like this would work…

    Code:

    which came from another good resource (free…)

    http://www.w3schools.com/php/php_mysql_create.asp

    #73424
    MichaelR
    Member

    @Irrorate DO you have to install WAMP if you have PHP and MySQL on your website/server online? Can you not just upload nyfiles to the website?

    Thanks Michael

    #73419
    Rob MacKay
    Participant

    you really should have read the sticky :P

    viewtopic.php?f=6&t=1721

    #73427
    matt25
    Participant

    The ones in the Sticky are awesome, if you want a more extensible course then check out http://www.lynda.com
    Matt

    #73428
    Irrorate
    Member
    "MichaelR" wrote:
    @Irrorate DO you have to install WAMP if you have PHP and MySQL on your website/server online? Can you not just upload nyfiles to the website?

    Thanks Michael

    You only need to install a local server (WAMP/MAMP/XAMPP) if you want to run a server on your local PC (i.e.via your own localhost). If you own webhosting it should come pre-installed with PHP and MySQL (I know most/all Apache servers do).

    If your website is online (i.e. has webhosting) it should already allow PHP and MySQL (if you’re not sure – open a support ticket)

    #73448
    MichaelR
    Member

    No, It does have PHP 5 and MySQL and PHPMyAdmin i’m asking do I have to install something like WAMP if I have an online website with these features.

    Also im having trouble with the following code from w3schools

    Code:

    I fill in the top line with the info when I created a mysql user but then leave the rest, it says cannot create database or something, do i have to change my_db or should it work like that. I know I will change it when I add more or with other projects but it should work, right?

    Thanks, Michael

    #73455
    Irrorate
    Member
    "MichaelR" wrote:
    No, It does have PHP 5 and MySQL and PHPMyAdmin i’m asking do I have to install something like WAMP if I have an online website with these features.

    Also im having trouble with the following code from w3schools

    Code:

    I fill in the top line with the info when I created a mysql user but then leave the rest, it says cannot create database or something, do i have to change my_db or should it work like that. I know I will change it when I add more or with other projects but it should work, right?

    Thanks, Michael

    No, WAMP isn’t necessary if you already have these features on an online webserver. WAMP is like a webserver, but you run it locally not on your actual website.

    Are your connection details right? (remember that every webserver is localhost to itself)

    If yes, maybe your PHP settings are stopping the script from creating a database (generally a lot are disabled for security reasons)

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Back End’ is closed to new topics and replies.