What's new

Closed HTML CODE how to connect my sql database

Status
Not open for further replies.

momo18

Addict
Joined
Jan 18, 2015
Posts
31
Reaction
4
Points
73
Mga ka ph may tanong ako, sana matulungan ninyo ako..
paano po iconnect ang html code . na ginawa sa may sql database?
sana po matulugan niyo ako for may thesis po.


Graduating. sana may makatulong
 
First i define mo muna kung ano ang HTML or intindihin mo talaga.
Second alamin mo ang PHP, (server side) or use python or kung san ka sanay,
Pero by the looks of it wla ka masyado alam sa kanya. HTML is di sya totally makakaganyan at hindi talaga since Text Mark Up languange lang yan, Meaning halos more on outputs lang and sets ng ibang bagay syempre pede din naman gumawa ng dynamic pages gamit ang HTML, pero hinahaluan din sya ng iba commonly, mga iba pang script.
^ try the code above okay yan depende per person / programmer / how you interpret ang isang bagay since ang pag pprogram eh parang words natin na writen in a different manner lang. Yung code above is pag connect sa DB mo using PHP.

Yung iba na MYSQL + PHP is halos mysql lang with php tags in it / php format. if marunong ka mag insert, delete, select and such madali mo lang mattutunan yan, yung php din naman ksi is server side.

And graduating ka pa pala pang thesis :/
dapat mga ganyan before high school self study na or pinagaaralan or what. Bago piliin ang course. Hmmm,
 
First is Install ka mo na ng Xampp tapus ilagay mo ang code na ito sa Html mo.

<?php
$db_host = "localhost";
$db_username = "username";
$db_pass = "password";
$db_name = "database";

@mysql_connect("$db_host","$db_username","$db_pass") or die ("Could not connect to MySQL");
@mysql_select_db("$db_name") or die ("No database");

echo"Successful connection";
?>

note: dapat instead of .html dapat .php para gumana yung code.
 
Php need mo... diba may database kana at design so need mo nalang is link to konek... goodluck po
 
Status
Not open for further replies.

Similar threads

Back
Top