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

Help mga sir. kung san ako mka2kuha ng free domain name
.com .net .org???:help::help::help::help::help:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

this is my complete code:
This php was being called by my index.php

Code:
<?php
    //variables
    try
     {
     session_start();
     $_SESSION['stay']['ususername']=$_POST['T1'];
     $_SESSION['stay']['uspassword']=$_POST['T2'];

         $ERRORS = array();
   
        if (!isset($_POST['T1']) || !ereg('^([a-zA-Z]){3,8}$', $_POST['T1']))
            {
            $ERRORS[]="Invalid Username"; 
            }
        if (!isset($_POST['T2']) || !ereg('^([a-zA-Z]+){3,8}$', $_POST['T1']))
            {
             $ERRORS[]="Invalid Password";
            }
        if (sizeof($ERRORS) > 0)
           {
           $gg='';
           foreach($ERRORS as $ee)
                 {
                 $gg=$gg .  '<li>' . $ee;
                 }
            throw new Exception($gg);
           }

    //database connection
    include ('connect.php');

      if (!$connection)
         {
             throw new Exception("Unable to connect!");
             }
              $_SESSION['stay']['limitcount']=200000;
                $_SESSION['stay']['deletecount']=50000;
         $_SESSION['stay']['recordcount']=23;

            header('location:home.php');

        }
       catch (Exception $e)
       {
           ?>
            <!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>Verify Login</title>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
               </head>
               <body >
                 <div id='maindiv'>
                 <?php
                  include ('header.html');
              ?>
                  <div id='body'>
               <form action="<?=$_SERVER['PHP_SELF']?>" method="post" name="F1"  >
              <u>U</u>sername:</br><input type="text" name="T1"size="20" accesskey='u' value="" /><br/>
                    <u>P</u>assword:</br><input type="password" name="T2" size="20" accesskey='p' value="" /><br/>
                    <input type="submit" name="S1" value="Submit" />
                <input type="reset" name="S2" value="Reset" />
               </form>
               <?php
                 echo $e->getMessage();
                 echo '</div>';

               //footer
                include('footer.html');

          echo'</div>
          </body>
        </html>';
         }
       //close database   
       if ($connection)
           {
               mysql_close($connection);
              }
      ?>
nagkakamali ba ako sa pag gamit nga catch? heheheheh

I dont use to much javascript for validation kasi our company were disabling javascript and we were using elinks browser and our chat client is finch and email was mutt para walang mag facebook heheheheh. Disturbo yan sa trabaho

Ganun ba? Don't use validations in front-end (javascript side) use validations in PHP and database side. Di nila pwde ma disable yang PHP. :)

Ika nga, PHP & database validations were required, while javascript were optional, they just add interaction sa user. Nang di makaisip ang user na patay ba tong page na ginagamit ko? Eyecandy - Wala kasing ka buhay.buhay ang site kung walang CSS at JS.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Ganun ba? Don't use validations in front-end (javascript side) use validations in PHP and database side. Di nila pwde ma disable yang PHP. :)

Ika nga, PHP & database validations were required, while javascript were optional, they just add interaction sa user. Nang di makaisip ang user na patay ba tong page na ginagamit ko? Eyecandy - Wala kasing ka buhay.buhay ang site kung walang CSS at JS.

This project was design for company use only and we were using elinks(text-based console web browser/terminal browser)..So exclude ko yung js at saka css ..We are after of the content wala munang fancy feature...

Yap database always have validation setup but im trying to catch it on php before going to database para hindi masyado ma busy si database....by the way thanks for some info hak.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Help mga sir. kung san ako mka2kuha ng free domain name
.com .net .org???:help::help::help::help::help

wala ka makukuha free domain name jan sa mga yan, unless maki-sakay ka sa kanila as a subdomain like yourname.freehosting.com... the only way to register your domain name on a top-level domain like those you mentioned, is to pay... :)
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Ang good thing sa javascript pwede mo ng i validated lahat ng data bago magpunta sa server. Kung may wrong or kulang entry na ta trap na before makarating sa server which is efficient.

that is true jere. But we were disabling javascript for some good reason(security, no facebook environment).uninstall lahat ng browser then install elinks ito lang ang browser namin(terminal browser for linux)..
Besides para sa akin dapat yung site mo ay mag work properly with or without javascript. There were still people browsing the web with disabled javascript(estimated 10% isa na ako dyan makakaduling kasi yung maraming nag momove and ads ang page hehehehe)...
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga bossing pa help namn po tungkol sa dynamic radio button ,,alam ko makuha ang value sa Static,,pero sa dynamic nalilito po ako.

Eto po code ko sa dynamic radio button paki check nyo lang po:



<?php

global $conn;
$conn->cursorlocation = 3;

$query = "SELECT * FROM tbquestion";


$rs = $conn->execute($query);

if (!$rs)
echo "fdsaf";
else {
$num_columns = $rs->Fields->Count();

$n=1;
while (!$rs->EOF || $n <= $num_columns)
{
//$num = $rs->fields['QuestionID'];
$numID[$n]= $rs->fields['id'];
$num1 = $rs->fields['Question'];
$a = $rs->fields['a'];
$b = $rs->fields['b'];
$c = $rs->fields['c'];

echo "$n.";
//echo $num;
echo "  ";
echo $num1;
echo "<br>";
echo "  ";
echo "<input name='$a && $b && $c' id='$a && $b && $c' type='radio' value='$a'>$a";
echo "  ";
echo "<input name='$a && $b && $c' id='$a && $b && $c' type='radio' value='$b'>$b";
echo "  ";
echo "<input name='$a && $b && $c' id='$a && $b && $c' type='radio' value='$c'>$c";
echo "  ";
echo "<br>";
echo "<br>";
$n=$n + 1;
$rs->MoveNext();
}

function checks(){ // checking the answer

global $conn;
$conn->cursorlocation = 3;
$query1 = "SELECT * FROM tbquestion";

$rs1 = $conn->execute($query1);
$answ = $rs1->fields['answer'];
$num_columns1 = $rs1->Fields->Count();
$n1=1;
while (!$rs1->EOF )
{


if($_POST['$a && $b&& $c']== $answ ){
$SCORE=$SCORE+1;
}else{
$SCORE='Loser';
}


}
echo 'your score is <b>', $SCORE, '</b> ';
}


$rs->Close();

$rs = null;
}

if (isset($_POST['Submit'])){
checks();
}


?>





patulong namn po thnx :pray::praise:
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga bossing pa help namn po tungkol sa dynamic radio button ,,alam ko makuha ang value sa Static,,pero sa dynamic nalilito po ako.

Eto po code ko sa dynamic radio button paki check nyo lang po:



<?php

global $conn;
$conn->cursorlocation = 3;

$query = "SELECT * FROM tbquestion";


$rs = $conn->execute($query);

if (!$rs)
echo "fdsaf";
else {
$num_columns = $rs->Fields->Count();

$n=1;
while (!$rs->EOF || $n <= $num_columns)
{
//$num = $rs->fields['QuestionID'];
$numID[$n]= $rs->fields['id'];
$num1 = $rs->fields['Question'];
$a = $rs->fields['a'];
$b = $rs->fields['b'];
$c = $rs->fields['c'];

echo "$n.";
//echo $num;
echo "  ";
echo $num1;
echo "<br>";
echo "  ";
echo "<input name='$a && $b && $c' id='$a && $b && $c' type='radio' value='$a'>$a";
echo "  ";
echo "<input name='$a && $b && $c' id='$a && $b && $c' type='radio' value='$b'>$b";
echo "  ";
echo "<input name='$a && $b && $c' id='$a && $b && $c' type='radio' value='$c'>$c";
echo "  ";
echo "<br>";
echo "<br>";
$n=$n + 1;
$rs->MoveNext();
}

function checks(){ // checking the answer

global $conn;
$conn->cursorlocation = 3;
$query1 = "SELECT * FROM tbquestion";

$rs1 = $conn->execute($query1);
$answ = $rs1->fields['answer'];
$num_columns1 = $rs1->Fields->Count();
$n1=1;
while (!$rs1->EOF )
{


if($_POST['$a && $b&& $c']== $answ ){
$SCORE=$SCORE+1;
}else{
$SCORE='Loser';
}


}
echo 'your score is <b>', $SCORE, '</b> ';
}


$rs->Close();

$rs = null;
}

if (isset($_POST['Submit'])){
checks();
}


?>





patulong namn po thnx :pray::praise:

kulikutin mo itong sample...hope makatulong
Code:
<!--html page-->
 Admin:<input type="radio" name="R1" value="admin"
 checked="checked"/></br>
  Limited:<input type="radio" name="R1" value="user" />

then
//php code
  $selected_radio=$_POST['R1'];
     if (($selected_radio)=="admin")
          {
          boooom!
         }
    elseif (($selected_radio)=="user")
         {
          boooom again!!!!
        }
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Help mga sir. kung san ako mka2kuha ng free domain name
.com .net .org???:help::help::help::help::help:

Walang free na top level domai. Kung gusto mo ng clean looking URL. Try .cc or .tk kaso minsan flag sya as spam sa social networking websites.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

kulikutin mo itong sample...hope makatulong
Code:
<!--html page-->
 Admin:<input type="radio" name="R1" value="admin"
 checked="checked"/></br>
  Limited:<input type="radio" name="R1" value="user" />

then
//php code
  $selected_radio=$_POST['R1'];
     if (($selected_radio)=="admin")
          {
          boooom!
         }
    elseif (($selected_radio)=="user")
         {
          boooom again!!!!
        }

salamat po sir try ko po,,:yipee::yipee::yipee:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Sir, Gusto ko sana mag aral ng php. Sir need ba internet connection para ma install mga kelangang application para sa php?
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

nope, hindi naman... you'll just need connection for the file transfer kapag maglipat ka na ng files mo from your pc to a remote host... and/or panghanap ng tutorials... pero pwede ka na gumawa ng php files jsut by downloading wamp or xampp and installing it on your own pc... it will act as the host, para mapagana mo yung mga php files mo on your pc
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

ganun po ba sir jskhulitz.. anu pa bo kelangang application para sa php po. yung latest sir ah. para i download ko na.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

ganun po ba sir jskhulitz.. anu pa bo kelangang application para sa php po. yung latest sir ah. para i download ko na.

Pwede mo gamitin ang xampp para magkaroon ka na local na web server (Apache), mySQL para database server, and PHP.

Syempre kailangan mo ng text editor para sa paggawa mo ng mga php files. Ang magandang text editor ay yung may line numbering. Ang error ng PHP karaniwang may nakalagay na kung anong file at line number. Notepad++ and bluefish editor(iyun lang naiisip ko ngayon) but there are many candidate as php editor.

Then you can use phpMyAdmin(kasama sa xampp) para sa gui manipulation ng mySQL na web based.

Here is the link: http://http://www.apachefriends.org/en/xampp.html
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

san po pde makapag DL ng dreamweaver for free po.. ung di po corrupted please..
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

san po pde makapag DL ng dreamweaver for free po.. ung di po corrupted please..

For me mas maganda use na lamg ng text editor(tha basic way of doing web site). Kon sa babae simple lang walang makeup importante bagong ligo..Ganoon lang. kasi if you will use some tools paano kong wala nang pirated. Gasto na naman.Huwag masyadong dependent sa mga additive tools so that kahit saang lupalok ng mundo makagawa ka ng html/php file...
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

For me mas maganda use na lamg ng text editor(tha basic way of doing web site). Kon sa babae simple lang walang makeup importante bagong ligo..Ganoon lang. kasi if you will use some tools paano kong wala nang pirated. Gasto na naman.Huwag masyadong dependent sa mga additive tools so that kahit saang lupalok ng mundo makagawa ka ng html/php file...

pero madaming company is need tlga ng may alam sa mga programming application/tools, which is kasama na din ang dreamweaver,,..but, sang ayon pa rin ako syo..
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

try mo eclipse, maganda sya pang php kasi meron syang syntax checker at syntax autocomplete, need mo nga lng ng java sdk
 
Back
Top Bottom