{"id":933,"date":"2013-04-15T05:28:52","date_gmt":"2013-04-14T19:28:52","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=933"},"modified":"2018-08-31T11:28:44","modified_gmt":"2018-08-31T01:28:44","slug":"php-and-mysql-via-mamp-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-and-mysql-via-mamp-primer-tutorial\/","title":{"rendered":"PHP and MySql via MAMP Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MySql_Primer\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PHP and MySql via MAMP Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MySql_Primer\/PHP_MySql_MAMP-7of.jpg\" title=\"PHP and MySql via MAMP Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">PHP and MySql via MAMP Primer Tutorial<\/p><\/div>\n<p>\nPHP is a server-side language hankering to do database and file management at the server?<\/p>\n<p>Unfortunately this can not be done with a handkerchief alone, as you will also need a database like MySql.<\/p>\n<p>What else is needed?   A framework to act as a web server, and for our purposes on this tutorial, on a Mac laptop, we are going to use <a target=_blank title='MAMP' href='http:\/\/mamp.info'>MAMP<\/a>.<\/p>\n<p>So we will first show you the MAMP environment for PHP and MySql where we are talking about URLs like http:\/\/localhost:8888\/ ( or http:\/\/127.0.0.1:8888\/ ).<\/p>\n<p>Then we will show you a MySql database and table that we will access later via PHP.<\/p>\n<p>Then we will show you two simple PHP scripts to ask for requirements from the MySql database, and one to report on the results of running that SQL query on that MySql database.<\/p>\n<p>Grasp these concepts and a lot of functionality opens up.   Imagine what you could do with Ajax techniques.<\/p>\n<p>Enjoy the <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/MySql_Primer\/'>tutorial<\/a>.<\/p>\n<p>A great book for this subject is<\/p>\n<blockquote><p>Professional PHP Programming by Jesus Castagnetto, Harish Rawat, Sascha Schumann, Chris Scollo, Deepak Veliath<\/p><\/blockquote>\n<p>Link to downloadable source code of PHP above is <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MySql_Primer\/ourmysql_test.php_GETME\" title='ourmysql_test.php'>ourmysql_test.php<\/a> and <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MySql_Primer\/ourmysqltest.php_GETME\" title='ourmysqltest.php'>ourmysqltest.php<\/a> which you need to rename in order to try.\n<\/p>\n<p>Here is a lifesaver of a <a target=_blank title='When MySql will not stop' href='http:\/\/www.witheringtree.com\/2010\/05\/how-to-resolve-mysql-not-starting-in-mamp\/'>link<\/a>, perhaps.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d933' onclick='var dv=document.getElementById(\"d933\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=Framework\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d933' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>PHP is a server-side language hankering to do database and file management at the server? Unfortunately this can not be done with a handkerchief alone, as you will also need a database like MySql. What else is needed? A framework &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-and-mysql-via-mamp-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[85,462,714,723,744,827,932,1400,1411,1421],"class_list":["post-933","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-apache","tag-framework","tag-local-web-server","tag-mac","tag-mamp","tag-mysql","tag-php","tag-web","tag-web-server","tag-website"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/933"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=933"}],"version-history":[{"count":1,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/933\/revisions"}],"predecessor-version":[{"id":40464,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/933\/revisions\/40464"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}