Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok dito

Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

sir paano poh ba ito gawin ? pag tinutok ko yung mouse ko sa isang image , bigla na lang poh nalaki paano poh yun ?


Java script ,Jquery, Ajax etc. ang Script na gagamitin para ma achieve mo yang ganyang zoom effect ng image pag naka mouse over siya..

Search Mo sa net, Image Zoom, madaming code at design na pwede i apply..

Sana makatulong to Java Script Code :thumbsup:

Code for Zoom: Courtesy from www.about.com

function findDOM(objectId) {
if (document.getElementById) {
return (document.getElementById(objectId));}
if (document.all) {
return (document.all[objectId]);}
}
function zoom(type,imgx,sz) {
imgd = findDOM(imgx);
if (type=="+" && imgd.width < 175) {
imgd.width += 2;imgd.height += (2*sz);}
if (type=="-" && imgd.width > 20) {
imgd.width -= 2;imgd.height -= (2*sz);}
}

html -->
<div align="center"><img id="myimg" alt=""
src="graphics/steve.jpg" width="66" height="92"><br />
<a href="#"
onclick="zoom('-','myimg',92/66)">Smaller</a> |
<a href="#"
onclick="zoom('+','myimg',92/66)">Bigger</a>
</div>
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

function findDOM(objectId) {
if (document.getElementById) {
return (document.getElementById(objectId));}
if (document.all) {
return (document.all[objectId]);}
}
function zoom(type,imgx,sz) {
imgd = findDOM(imgx);
if (type=="+" && imgd.width < 175) {
imgd.width += 2;imgd.height += (2*sz);}
if (type=="-" && imgd.width > 20) {
imgd.width -= 2;imgd.height -= (2*sz);}
}

html -->
<div align="center"><img id="myimg" alt=""
src="graphics/steve.jpg" width="66" height="92"><br />
<a href="#"
onclick="zoom('-','myimg',92/66)">Smaller</a> |
<a href="#"
onclick="zoom('+','myimg',92/66)">Bigger</a>
</div>

try ko poh salamat ^^
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

sir paayos nga poh itong code gawin niyu poh , pagtinutok yung mouse sa image kusa na lang poh lalaki , .. pa-ayos poh ah ^^

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<base href="http://www.coothead.co.uk/images/">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">


<title>zoom in, zoom out</title>

<style type="text/css">
body {
    background-image:url(bodyBg.jpg);
 }
#pic{
    width:60px;   /*initial image width*/
    height:42px;   /*initial image height*/
    position:absolute;
    top:50%;
    left:50%;
    margin-left:-33px;
    margin-top:-24px;
    border:3px double #fc9;
    background-color:#009;
 }
#but {
    width:100px;
    line-height:25px;
    border:3px double #fc9;
    background-color:#2e475d;
    font-family:verdana,arial,helvetica,sans-serif;
    font-size:1em;
    color:#fee66a;
    text-align:center;
    cursor:pointer;
    margin:30px 30px 0 0;
    float:right;
 }
</style>

<script type="text/javascript">

/******************************* these are the editable variables *******************************/

   var w=400;    /*actual image width*/
   var h=400;    /*actual image height*/
   var c=150;     /*this value is equal to the inital image width*/
   var rat=h/w   /*this value is equal to the height of image divided by the width of image*/
   var speed=10; /*this value varies the rate of zoom in conjunction with var exp*/
   var exp=10;    /*this value varies the rate of zoom in conjunction with var speed*/
   var bw=6;     /*this value is equal to image border width times two*/

/***********************************************************************************************/

   var shr=-exp;
   var init=c;
   var test=true;
   var obj;
   var obj1;

if(window.addEventListener){
   window.addEventListener('load',setup,false);
 }
else { 
if(window.attachEvent){
   window.attachEvent('onload',setup);
  }
 }

function setup(){
   obj=document.getElementById('pic');
   obj1=document.getElementById('but');
   obj1.onclick=function() {
if(test==true) {
   obj1.firstChild.nodeValue='zoom out';
   test=false;
   zoooom(exp);
 }
else {   
   obj1.firstChild.nodeValue='zoom in';
   test=true;
   zoooom(shr);
   }
  }
 }

function zoooom(inc) {
if(c<init) {
   c=init; 
   test=true;
   return;
 } 
if(c>w) {
   c=w;
   test=false;
   return;
 } 
   obj.style.marginLeft=-(c+bw)/2+'px';
   obj.style.marginTop=-rat*(c+bw)/2+'px';
   obj.style.width=c+'px';
   obj.style.height=rat*c+'px';
   c+=inc;
   inc1=inc;
   setTimeout('zoooom(inc1)',speed);
 }
</script>

</head>
<body>

<div>
<img id="pic" src="buddha.jpg" alt="">
</div>

<div id="but">zoom in</div>

</body>
</html>

ayan poh yung code pa-ayos poh ah .. see niyu na lang poh yung image na-nakaattach , pwede poh alisin niyu yung zoom in ,

ang gusto ko lang po mangyari pag tinutok yung mouse sa image kusa na lang poh lalaki . ^^ salamat poh
 

Attachments

  • aaa.JPG
    aaa.JPG
    58.3 KB · Views: 2
  • aaaa.JPG
    aaaa.JPG
    110.4 KB · Views: 1
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

sir paayos nga poh itong code gawin niyu poh , pagtinutok yung mouse sa image kusa na lang poh lalaki , .. pa-ayos poh ah ^^

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<base href="http://www.coothead.co.uk/images/">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">


<title>zoom in, zoom out</title>

<style type="text/css">
body {
    background-image:url(bodyBg.jpg);
 }
#pic{
    width:60px;   /*initial image width*/
    height:42px;   /*initial image height*/
    position:absolute;
    top:50%;
    left:50%;
    margin-left:-33px;
    margin-top:-24px;
    border:3px double #fc9;
    background-color:#009;
 }
#but {
    width:100px;
    line-height:25px;
    border:3px double #fc9;
    background-color:#2e475d;
    font-family:verdana,arial,helvetica,sans-serif;
    font-size:1em;
    color:#fee66a;
    text-align:center;
    cursor:pointer;
    margin:30px 30px 0 0;
    float:right;
 }
</style>

<script type="text/javascript">

/******************************* these are the editable variables *******************************/

   var w=400;    /*actual image width*/
   var h=400;    /*actual image height*/
   var c=150;     /*this value is equal to the inital image width*/
   var rat=h/w   /*this value is equal to the height of image divided by the width of image*/
   var speed=10; /*this value varies the rate of zoom in conjunction with var exp*/
   var exp=10;    /*this value varies the rate of zoom in conjunction with var speed*/
   var bw=6;     /*this value is equal to image border width times two*/

/***********************************************************************************************/

   var shr=-exp;
   var init=c;
   var test=true;
   var obj;
   var obj1;

if(window.addEventListener){
   window.addEventListener('load',setup,false);
 }
else { 
if(window.attachEvent){
   window.attachEvent('onload',setup);
  }
 }

function setup(){
   obj=document.getElementById('pic');
   obj1=document.getElementById('but');
   obj1.onclick=function() {
if(test==true) {
   obj1.firstChild.nodeValue='zoom out';
   test=false;
   zoooom(exp);
 }
else {   
   obj1.firstChild.nodeValue='zoom in';
   test=true;
   zoooom(shr);
   }
  }
 }

function zoooom(inc) {
if(c<init) {
   c=init; 
   test=true;
   return;
 } 
if(c>w) {
   c=w;
   test=false;
   return;
 } 
   obj.style.marginLeft=-(c+bw)/2+'px';
   obj.style.marginTop=-rat*(c+bw)/2+'px';
   obj.style.width=c+'px';
   obj.style.height=rat*c+'px';
   c+=inc;
   inc1=inc;
   setTimeout('zoooom(inc1)',speed);
 }
</script>

</head>
<body>

<div>
<img id="pic" src="buddha.jpg" alt="">
</div>

<div id="but">zoom in</div>

</body>
</html>

ayan poh yung code pa-ayos poh ah .. see niyu na lang poh yung image na-nakaattach , pwede poh alisin niyu yung zoom in ,

ang gusto ko lang po mangyari pag tinutok yung mouse sa image kusa na lang poh lalaki . ^^ salamat poh


Sana makatulong to.. Option No.: 1

Ito po try mo na, my binago lang ako jan para mag mouseover zoom na siya..

obj1.onclick=function() {

ginawa ko siyang -->

obj1.onmouseover=function(){

/*----------------------------------------------------*/

Binago ko din yung CSS...


#but {cursor:pointer;
}


ito yung html code:

<div id="but"><img id="pic" src="images/theloveofsiamphils_small.jpg" alt=""></div>

--->Overall Code

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">


<title>zoom in, zoom out</title>

<style type="text/css">
body {
background-image:url(bodyBg.jpg);
}
#pic{
width:60px; /*initial image width*/
height:42px; /*initial image height*/
position:absolute;
top:50%;
left:50%;
margin-left:-33px;
margin-top:-24px;
border:3px double #fc9;
background-color:#009;
}
#but {cursor:pointer;
}
</style>

<script type="text/javascript">

/******************************* these are the editable variables *******************************/

var w=400; /*actual image width*/
var h=400; /*actual image height*/
var c=150; /*this value is equal to the inital image width*/
var rat=h/w /*this value is equal to the height of image divided by the width of image*/
var speed=10; /*this value varies the rate of zoom in conjunction with var exp*/
var exp=10; /*this value varies the rate of zoom in conjunction with var speed*/
var bw=6; /*this value is equal to image border width times two*/

/***********************************************************************************************/

var shr=-exp;
var init=c;
var test=true;
var obj;
var obj1;

if(window.addEventListener){
window.addEventListener('load',setup,false);
}
else {
if(window.attachEvent){
window.attachEvent('onload',setup);
}
}

function setup(){
obj=document.getElementById('pic');
obj1=document.getElementById('but');
obj1.onmouseover=function() {
if(test==true) {
obj1.firstChild.nodeValue='zoom out';
test=false;
zoooom(exp);
}
else {
obj1.firstChild.nodeValue='zoom in';
test=true;
zoooom(shr);
}
}
}
function zoooom(inc) {
if(c<init) {
c=init;
test=true;
return;
}
if(c>w) {
c=w;
test=false;
return;
}
obj.style.marginLeft=-(c+bw)/2+'px';
obj.style.marginTop=-rat*(c+bw)/2+'px';
obj.style.width=c+'px';
obj.style.height=rat*c+'px';
c+=inc;
inc1=inc;
setTimeout('zoooom(inc1)',speed);
}
</script>

</head>

<div id="but"><img id="pic" src="images/theloveofsiamphils_small.jpg" alt=""></div>

</body>
</html>



<---

"ayan poh yung code pa-ayos poh ah .. see niyu na lang poh yung image na-nakaattach , pwede poh alisin niyu yung zoom in ,
ang gusto ko lang po mangyari pag tinutok yung mouse sa image kusa na lang poh lalaki . ^^ salamat poh"


ito yung Code sa Gusto mo ma achieve na pag tinutok mo sa image ay lalaki na siya without zoomin..


Option No.: 2

/*------------------------------------------*/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script src="js/advanced-preview.js" type="text/javascript"></script>
<script src="js/jquery.js" type="text/javascript"></script>

<script language="JavaScript" type="text/javascript">
this.imagePreview = function(){
xOffset = 10;
yOffset = 30;

imgDiv = 2;


$("a.preview").hover(function(e){
var img = new Image();
$("#preview-image").remove();

$("body").append('<div id="preview-image" style="display: none; position: absolute; z-index: 20000000;"></div>');
ptop = (e.pageY - xOffset);
pleft = (e.pageX + yOffset);
var iml = this.href
$("#preview-image").html('');
$("#preview-image")
.css("top", ptop + "px")
.css("left", pleft + "px")

.show();
$("#preview-image").addClass('loading');

$(img)
.load(function(){
$(this).hide();
$("#preview-image")
.removeClass('loading')
.html('')
.append(this);
if (img.width > $(window).width() && img.height > $(window).height()){

xDif = (img.width - $(window).width());
yDif = (img.width - $(window).height());
if (xDif > yDif) {
img.width = ($(window).width()-($(window).width()/2));
} else {

img.height = ($(window).height() - ($(window).height()/2))
}
} else if (img.width > $(window).width()){
img.width = ($(window).width() - ($(window).width()/2))
} else if (img.height > $(window).height()){

img.height = ($(window).height() - ($(window).height()/2))
}
// adjust the width and height attributes

$(this).fadeIn("fast");
if (((ptop + $("#preview-image").height())-$(window).scrollTop()) > $(window).height()){
// Find a placement where it won't fall below the window
ptop = ($(window).height()-($("#preview-image").height())) + $(window).scrollTop();
}
if (ptop < $(window).scrollTop()){
ptop = $(window).scrollTop();
}
if ((pleft + $("#preview-image").width()) > $(window).width()){
pleft = ($(window).width()-$("#preview-image").width());
//pleft = $(window).width()-img.width;
}
$("#preview-image")
.css("top",ptop + "px")
.css("left",pleft + "px");

})
.attr('src', iml);
}, function(){
$("#preview-image").hide();
$("#preview-image").remove();
});

$("a.preview").mousemove(function(e){
ptop = (e.pageY - xOffset);
pleft = (e.pageX + yOffset);
if (((ptop + $("#preview-image").height())-$(window).scrollTop()) > $(window).height()){
// Find a placement where it won't fall below the window
ptop = ($(window).height()-($("#preview-image").height())) + $(window).scrollTop();

}
if (ptop < $(window).scrollTop()){
ptop = $(window).scrollTop();
}

if ((pleft + $("#preview-image").width()) > $(window).width()){
pleft = ($(window).width() - $("#preview-image").width());
if ((e.pageX + xOffset) > pleft && (e.pageX + xOffset) < (pleft + $("#preview-image").width())){
ptop = e.pageY + yOffset;
}
//pleft = $(window).width()-img.width;
}
$("#preview-image")
.css("top",ptop + "px")
.css("left",pleft + "px");
});

};

// starting the script on page load
$(document).ready(function(){
imagePreview();
});
</script>
<style type="text/css">
.loading {
background: url(/images/loadingAnimation.gif);
width: 208px;
height: 13px;
}
</style>
</head>
<body>
<a class="preview" href="images/theloveofsiamphils.jpg"><img src="images/theloveofsiamphils_small.jpg" with="100" height="100"></a>
</body>
</html>

Note: May attachment yung sa Option 2, kelangan kc ng Jquery kaya nilagay q na sa files, pati yung Script sa taas na advance preview pde mu din ilagay sa Js files para ndi na mahaba ung HTML mo,

--->

<script src="js/advanced-preview.js" type="text/javascript"></script>
<script src="js/jquery.js" type="text/javascript"></script>

<-- :thumbsup:

Naka Attach na din yung code for image zoom para madali mo ng gamitin..
 

Attachments

  • jquery.rar
    19.7 KB · Views: 12
  • img_zoom.rar
    277 KB · Views: 18
  • zoom1.rar
    276.2 KB · Views: 54
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga bosing pa anu po to?????

sa Cform po pag nag send na ng email sa email mo meron ding email na mapupunta sa iyong database.

pa help po kung pa-anu to gawin:upset:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Sir nag uumpissa palang po ako sa html. may ginawa akong basic,na display ko na siya sa mozilla na browser.ngayon gusto ko syiang e-edit.nag clisk ako sa view tab ng browser,wala po akong makita na source tab o page source tab. ano po gagawin ko para ma-edit ko po siya. salamat po. paki pm nalang po sa fb ang reply.
http//www.facebook.com/cabuayjr.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

@yuwishinu - salamat poh hitted ka na poh try ko poh sa bahay pag-uwi ko haha ^^
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

haha salamat working yung option 1 ^^
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Patulong naman po ako d2 mga mamaw jan sa programming.. andun poh sa attachment ung isosolve.. tnx po.. gawin ko lang po sana guide, la kc ako idea ehh kung anung tamang way para gawin yan.. ung tamang structure po ng code.. tnx po..
 

Attachments

  • webpropgrammertest.zip
    89.8 KB · Views: 11
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

may instruction na poh jan sa loob ng zip.. tnx in advance. sana po may 2mulong skin.. php po yan.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2


pa help naman po. gusto ko matutu PHP at mySQL

pag po gumagawa ako ng database/tables sa mySQL (CLI) san po na se-save yung file na yun??
.sql ba file name nun?

penge rin po sana ng sample yung PINAKA basic na pag DISPLAY ng DATA sa browser
galing sa database using PHP/mySQL

hindi kasi ako maka gawa hindi ko makita kung nasan nase-save yung database na ginagawa ko sa mySQL eh. thanks po..
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2


pa help naman po. gusto ko matutu PHP at mySQL

pag po gumagawa ako ng database/tables sa mySQL (CLI) san po na se-save yung file na yun??
.sql ba file name nun?

penge rin po sana ng sample yung PINAKA basic na pag DISPLAY ng DATA sa browser
galing sa database using PHP/mySQL

hindi kasi ako maka gawa hindi ko makita kung nasan nase-save yung database na ginagawa ko sa mySQL eh. thanks po..

first thing is to install wamp
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

first thing is to install wamp


meron na po ako XAMPP..

ok na po yung settings ko..
baka po meron kayo sample yung PINAKA basic
kung pano mag display ng DATA galing sa DATABASE.

wala kasi akong subject na PHP eh :weep: kaya di ko alam.

hindi ko kasi agad masundan tut. sa net.

pero kung may sample po kyo jan ser pahiram sana.

:salute:

 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Patulong naman po ako d2 mga mamaw jan sa programming.. andun poh sa attachment ung isosolve.. tnx po.. gawin ko lang po sana guide, la kc ako idea ehh kung anung tamang way para gawin yan.. ung tamang structure po ng code.. tnx po..

Panalo ka boy, ah. Practical exam for application para sa isang web developer position. Nag-aaply ka ng job?

Basahin mo ito: http://www.pinoyexchange.com/forums/showthread.php?t=413276&page=3#53

Iyan yata ang company na pinanggalingan ng exam mo.
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2


meron na po ako XAMPP..

ok na po yung settings ko..
baka po meron kayo sample yung PINAKA basic
kung pano mag display ng DATA galing sa DATABASE.

wala kasi akong subject na PHP eh :weep: kaya di ko alam.

hindi ko kasi agad masundan tut. sa net.

pero kung may sample po kyo jan ser pahiram sana.

:salute:



sir dito nalang po kayo www.w3schools.com or www.phpacademy.com
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2


meron na po ako XAMPP..

ok na po yung settings ko..
baka po meron kayo sample yung PINAKA basic
kung pano mag display ng DATA galing sa DATABASE.

wala kasi akong subject na PHP eh :weep: kaya di ko alam.

hindi ko kasi agad masundan tut. sa net.

pero kung may sample po kyo jan ser pahiram sana.

:salute:

first po gawa ka ng database using xampp gui...
how:
1. goto localhost/phpmyadmin
2. create database
3. create table and define mo kung ilan ung fields nya...
4. lagay ka na ng laman ng fields..

how to retrive data from database:
1. create test.php
2. type this
<?php
$connect = mysql_connect('localhost', 'root', ''); <- default po ito
$db = mysql_select_db("name of your database");
$query = mysql_query("Select * from tablename"); <-table name po change mo lang ng name ng table mo.
while($data = mysql_fetch_array($query))
{
echo "$data[fieldname]"; <- lagay mo lahat ng field name mo ulitin mo lang po yang line na yan.... e.g(echo "$data[fieldname2]";)
}
?>

yan po ung pinakabasic..:clap:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Sir nag uumpissa palang po ako sa html. may ginawa akong basic,na display ko na siya sa mozilla na browser.ngayon gusto ko syiang e-edit.nag clisk ako sa view tab ng browser,wala po akong makita na source tab o page source tab. ano po gagawin ko para ma-edit ko po siya. salamat po. paki pm nalang po sa fb ang reply.
http//www.facebook.com/cabuayjr.

Kung san mo ginawa yang HTML mo dun mo din siya ieedit then refresh mo lang yung browser mo to take effect,

Example: Gumamit ka ng NotePad or something na katulad ng Notepad,

Pag natapos mo na siya, Save mo na as HTML, then locate mo yung file kung san mo sinave..

After that I-run mo na thru your browser, after that you will see the result at the browser

ito na yung hinahanap mo, if how to Edit yung ginawa mo

Option 1.
Go to your HTML Files..Yung kaninang Sinave mo
-->Right Click Mo siya then..
-->Open with, choose Editor..Yung Pinang Edit mo sa ginawa mong HTML like NotePad..

Option 2.

Pde ka din na magpunta sa Software na Pinag editan mo ng HTML mo then Run your software, Like Notepad..

After that..
Go to menubar then..
-->Go to files..
-->Open Files, tapos hanapin mo yung ginawa mong HTML para ma view mo yung sourcecode at pde mo na siyang iedit..
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2


meron na po ako XAMPP..

ok na po yung settings ko..
baka po meron kayo sample yung PINAKA basic
kung pano mag display ng DATA galing sa DATABASE.

wala kasi akong subject na PHP eh :weep: kaya di ko alam.

hindi ko kasi agad masundan tut. sa net.

pero kung may sample po kyo jan ser pahiram sana.

:salute:



Gusto ko lang ishare sayu na hindi din ako nag aral ng PHP but nag self study ako para malaman ko ang lahat ng kailangang malaman..magtiwala ka lang sa sarili mo at magagwa mo yang gusto mong gawin, sa umpisa meju panghihinaan ka loob at iisipin mong mahirap pero wag kang mawalan ng pag-asa kasi nga..

ito yung code para mag display yung data sa website -->

<?php

1. //connection to server
1. //Localhost mo = "127.0.0.1" or "Localhost"
1. //username ="root" or "ikaw na bahala mag lagay"
1.//password="none" or "ikaw na bahala mag lagay"

1. $con = mysql_connect("127.0.0.1", "root", "");

2. //nag diclare tayo ng string -($con) to connect at if statement para malaman kung nakakonek ba sa server o hindi
Note:mahalang nag i if stament tayo para malaman natin ang reuslta kung konekted ba tayo o hindi.
2. if (!$con) {
die('Could not connect: ' . mysql_error());
}


3. //connection to your database
3. mysql_select_db("databace", $con);

4. //nagdiclare ulet tayo ng string-($result) for database
4. $result = mysql_query("SELECT * FROM TABLE WHERE tabledata=$tabledata '");


5. //nag diclare tayo ng while loop para sa result ng database
5. while($row = mysql_fetch_array($result)) {
5. //nagdicalre tayo ulet ng string-($row) kung saan jan makikita yung result
5. //ifefetch or kukunin yung data sa database

6. //gumamit tayo ng if statement at empty statemen para kung may laman ang data or not mepty(!empty) eecho out niya o ipapakita niya yung result.
6. if (!empty($row['data of your table'])) {
echo "may laman ang data";
} else {
echo "wlang laman ang data";
}


?>
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Patulong naman po ako d2 mga mamaw jan sa programming.. andun poh sa attachment ung isosolve.. tnx po.. gawin ko lang po sana guide, la kc ako idea ehh kung anung tamang way para gawin yan.. ung tamang structure po ng code.. tnx po..

Basic thing to know, kelangan my alam ka sa simpleng code like HTML and CSS.. after that you know how to design and to use java script like AJAX, JQUERY, etc., Kung alam mo na ang lahat ng yan..next level ka na, ang pag lagay ng database sa website na dinesign mo, PHP is the easier way para maka connect sa database, sobrang dali ng PHP, sa una meju may kalituhan kasi marami kang code na aalamin like, Declaring, Variables, Indexes, Array, Loop, If statement, While Statement, POST, GET, SELECT, RETRIEVE, DELETE, INSERT, etc. pag alam mo ng lahat ng yan o may kaalaman ka na, pde mo ng iaaply yan sa website mo na my database, at ang masa malupet ay pag ang PHP at Jquery ang pinagsama kaya lang meju mahirap yun eh.. ang Jquery at PHP at tinatawag din na "JSON" ito yung gamit na programming sa Facebook, at FBTML or HTML.

Visit this website para sa tutorial

WWW.PHPACADEMY.ORG

para naman sa PHP/MYSQL/APACHE Server mo

WWW.EASYPHP.ORG

sana makatulong ang lahat ng siabi ko.. :thumbsup:
 
Back
Top Bottom