Soallofthesethingshavetoworktogethersimplyforyoutobeabletodosomethingassimpleascreativeformandbeoftheinputdataintoyourmysequeldatabasetablesusing a PHPscript.
Sowiththat, let's goovertothecomputerand I willshowyouhowallthisworks.
Sohereweare, atmylabsetup, asalways, have a bunchofdesktop 18.4 Lt s running.
I haven't runningwithin a virtualmachineinvirtualbox.
AndthisisonmyMacbookPro.
I haveusedtasks l t A s K S E l inordertoinstalltheentirelampstackontothisribbon, too.
Desktopoperatingsystem.
So I haveApacheinmysequelonPHP.
I havenotmodifyanyofthedefaultconfigurationsotherotherthantosimplyput a PHPfolderintheroutefortheApacheofPublicDirectory.
Otherwise, I havenotmodifiedPete, Peteand I and I v hostsoranythinglikethat I'm usinginordertocodethelittleHTMLandthePHPfortoday.
I amsimplyusing G Edit.
Thisisjust a basictexteditor, becauseagain, whenwe'redoingthesesimpleprojects, I likeusingthesimplesttexteditorpossible.
Thenwegothroughhereandseethestandarddatabases, andthenwehavetheClass D B andClass D B backup.
Sotheclassthebeeisthedatabasethatwe'reusing, oratleastthat I amusingsomethingaudiouseclassorcase D B semicolonisalwaysthatbringsusintotheclass D B fromhere.
Wouldyoushowtables?
Semicolon.
I'm gonnagoinhereandseewhatthetablesare.
A wholebunchoftablesatthispoint, becauseagain, I'vebeenusingthisdatabaseserverforalltheclassesupuntilnow.
Youwillnotice I havecreated a student's tablebackup.
Sostudentsunderscore B A.
K is a backupofthestudentstableincase I screwanythingup.
So I wouldah, highlyadviseifyou'regonnabedealingwithtables, especiallywithcodingthatyoucreate a backupsothatifyouhavetobelievetheentiretable, youhavesomethingtogobacktoyouratherquickly.
WaysWehavethestudentstablehere.
Sothefirstthingwe'regoingtodoiswe'resimplygoingtodescribethe S c thestudentstabletoverifywhatthisevenstilltoday.
Verifywhatthestudentstablelookslike.
Soyouclickhereandokay, sowecansee a student.
I d We'renotgonnamesswiththis.
Thisisaninteger.
It's a primarykey, andthisiswhatyouautoincrements.
Soif I onlyputtwooptionsif I onlyputboyandgirlthanitwoulddefaulttoeitherboyorgirlandthenifsomebodywasn't thinkingaboutitandtheyputinthenameandtheyputintheageButtheyputput, theydidn't verifythegenderwascorrect.
There's gonnabe a wholeformof 20 differentfieldsifyouwantedtobehim.
Now, let's gooverandtake a lookatthe P h p T E s t file.
Letmejustclick, save, Makesurethatsaved.
Sowe'regonnagohere.
Andso I havethisfilecalledPHPuppercase D E s t gonnaopenthisupandwe'regoingtoseehereis a veryincredible, incrediblysimplePHPscript.
Basically, what I'm usingthisPHPscriptforisjusttoverifythatthingswereworkingproperlywhen I inputdataintotheHTMLformandthenpassitoverto a PHPscriptthatitactuallygetsparsedhowit's supposedtogetparts.
Sowhatwehavehereisgoingtoopenup a PHP a scriptlikewenormally d'oh.
Thenwe'regoingtocreate a variabledollarsignname.
Sonowit's gonnabedollarsign.
Dollarsign.
Nameisgoingtoequalthevaluefrompost.
Thatisname, right.
SowecreatedthatvalueintheHTMLforSowegoherewetake a lookat a formerhome.
Soagain, name, age, gender.
Sowhenwegooverheretothescriptthatwe'regonnabedealingwithrightnow, soit's got a dollarsignunderSkyPost, alluppercasebracket, singlequotationmark.
Solet's goovertotheformthat a femaleandsoherewe'regoingtodoiswe'regonnaupdatethistofour, sothatsonow, insteadofsendingthedatatothePHPtestdotPHPscript, we'renowgoingtosendthedatatotheph b formdotPHPscript.
Whenyougodown, gotothePH B formorwhateverelsethebigthinghereis.
Thisiswhereyou'regoingtocreatethePh p variablesandthenassignthevaluesofthosevariablestowhateverwaspassedfromtheHTMLforms a dollarsign, underscorepostbracketandthensingleordoublequotationmarks.
Andthenwhateverthenameisthatyouhaveinthefemaleform, soname a gender.
Insertsequelstatementswilldoinsertintostudent's name a gender.
Sothesearethecolumnnamesasnormalvaluesasnormal.
Theonlydifferencehereisthatwhenyoudothesinglequotationmarksinthesideof a singlequotationmarks, youwanttobeputtingthevariablenameversus a specificpieceofdata, andthenyou'llbepassingthatinformationoverwhenyoucomedownhereagaintotheIfyou'regonnadotheconnectionquery, you'regoingtosendthesequelstatementthatyoucreatedhereandinthistheecho.
Butinreality, mostWebapplicationsareinsertingdatainto a database, doingreportsoffofdataonthedatabaseandthencreatingfancychartsandthefancyuserinterfaces.
Butreally, mostofwhatWebapplicationsareisyouputdowninto a database, you'reabletodoreports, andthenthey'reabletomodifythedatainthedatabase.
Andifyouunderstandhowdothosethreesimpletasks, youcanactuallydo a lotofveryinterestingthings.
Ifwe'regoingtobedevelopingthisintosomekindofproductionlevelapplicationyouneedat a at a minimum, youneedCSSCascadianstyleshootsthatwouldmakethingsprettyput.
Colors, fonts, allthatkindofstuffbasically, beabletocreate a prettyuserinterface, andthemostlikelyyouwouldusesomethinglikeJavaScript.
JavaScriptis a clientsideprogramminglanguagethatallowsyoutodolikerollovereffectsandallowsyoutodolikedropdownmenusandthattypeofthing.
Andsothat's why I saythatifyou'regoingtobedoingthingslikeWebWebdevelopment, realistically, youneedtoknowatleastfiveprogramminglanguages, gettingHTMLCSSJavascript, PHPandsequel.
Butwhen I showedyoutodayisjust a verysimplewaytobeabletoinputdataagain, using a basicHTMLforem, I willwarnyouwiththisagain, Don't dothisin a productionenvironment.
There's nothere's nodoubtthat a validationonhere, Sowe'renotvalidatingthatThedatagoingintothedatabaseiscorrect.
So, asalways, I enjoyedyouinthisclassandlookfortoseewhatthenextone.
ApparentlythetypeofcontentyoujustsawisnotwhatSusan W.
WantsforthefutureofYouTube.
ThismeansthatrecommendationsbyYouTubetothischannelhavedroppedmassively, andviewsarebecoming a comicallysmall I hatetoask.
I usedtosay I wouldneverask, butifyoucouldsubscribelikecommonandmostimportantly, sharethevideosthatyouappreciate, thatmayhelpslowthedeathofthischannel.