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 pa

Write a program to find the number of times that the given word occurs in a sentence

Use regular expression para mabilis ang paghahanap ng word sa isang sentence then count the occurances and output it. It can be used on PHP, Javascript/Jquery and other prog languages and server scripts. So hindi kita mabbigyan ng advise kasi hindi ko alam kung anu nirerequire mo gamiting language.

ask ko lang po kung meron sa inyo ng

import ng .csv to database using script of php

This should answer your question directly.
http://stackoverflow.com/questions/14659992/load-a-csv-file-into-mysql-via-php

sir , pano na po icoconect ung database mo pag pinag upload mo na sya sa freewebhosting ? 3owl.com po gamit kung webhosting . salamat po :D

Please see yung template na ginawa ko below. It should help you out in the long run. Naginclude na rin ako ng sample scripts to insert, select, delete from the database. Ito latest approach when connecting into MySQL database sa server as long as the server is running PHP 4.1 and above. Most of the freehosting and paid hostings should be using PHP 5.0+ nowadays so walang problema.

http://pastiebin.com/52c380ed38d10

You should use MSQLI_CONNECT kaysa MSQL_CONNECT both will do pero malapit na alisin ang MSQL_CONNECT and soon will be deprecated or it might not work in the future projects you have. Both are procedural pero yung nasa template is object oriented approach mas madali mong matutunan at basahin.

If you want the Procedural style na kadalasang tinuturo sa schools or colleges:
http://pastiebin.com/52c388f90ee75

ano ang ilalagay sa db_host kapag nasa freewebhosting kana ?

Most of the time ilalagay mo eh "localhost". Pero if you are not sure access phpMyAdmin or any database admin and look for the host. Some hosting providers will use IP address and some are domain e.g "213.45.64.1" or "db.hosting.com.uk". Depende talaga sa server mo. Most of them just use localhost
View attachment 150356
 

Attachments

  • 2014-01-01_112400.png
    2014-01-01_112400.png
    156.6 KB · Views: 5
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

sir pa smple naman dyan ng pagination sa search.. Yung simple lang po hehe newbie pa lang po eh.. Ex. Po eh meron akong 1k data sa DB ko at 100 pages ang result ng search.. Pagination ko po na hanggang 10 lang yung number tapos mag cocompress sila bashang max na 10 lang ang result ng page.. Para pong dito sa symb na pagination
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

Kung simple pagination hinahanap mo at naghahanap ka ng pagaaralan na pagination may marerecommend ako na resource para sayo

Video Tutorial
http://www.developphp.com/view.php?tid=1039

Yang video tutorial na yan eh accompanied by this tutorial that you can follow including the actual scripts na ginamit dun sa video:
http://www.developphp.com/view_lesson.php?v=289

if may hindi ka maintindihan tanong ka lang. Try ko explain yung part na hindi mo maintindihan. Mas madali kasi kung magbbigay na lang ng available resource lalo na iisa lang naman ang system ng pagination pagdating sa initial calculation magkakaiba lang sa design, sa kulay, at look. Pero sa loob parehas lang talaga. It is up to the author/developer/programmer kung gusto nya ipakita lahat ng pages to the end or restrict lang sa few pages until it goes to the end.

Yun nga lang dito Symbianize forum mejo iba ang output. Sa tutorial kasi nyan ganito ang output
Page 3 of 345
Back 1 2 [3] 4 5 Next

While sa symbianize:
Page 3 of 345
1 2 [3] 4 5 13 53 103...> Last>>

Exact system pa rin na tinutukoy sa tutorial sa taas kaso may dinagdag ang symbianize sa calculation based sa current page na chncheck if it less than 10 50 or 100 total pages or if greater than 10 50 or 100 remaining pages. Yung output eh maiiba based sa two IFs na yun and restricted to 8 shown pages only. Atleast ayun naobserve ko kay symb.

Anyway, try mo yung tutorial vid muna then saka mo itanong paano ieembed sa search yun after mo magets yung pagination system. 2 separate systems kasi tinutukoy mo.:)
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

pano po to ayusin :help: :pray:

Warning: mysql_connect(): Access denied for user 'u436237114_db'@'localhost' (using password: YES) in /home/u436237114/public_html/config.php on line 2 Could not connect to Database
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

pano po to ayusin :help: :pray:

Warning: mysql_connect(): Access denied for user 'u436237114_db'@'localhost' (using password: YES) in /home/u436237114/public_html/config.php on line 2 Could not connect to Database

boss check mo yung user na u436237114_db kung may permission yan sa db mo..., at kung pwede post mo yung public_html/config.php ...
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

boss check mo yung user na u436237114_db kung may permission yan sa db mo..., at kung pwede post mo yung public_html/config.php ...


eto ba boss?

<?php
mysql_connect("localhost", "lil_db", "*****") or die ("Could not connect to Database");
mysql_select_db("login") or die("No Database selected");
?>

di ko kasi alam kung ano na ilalagay . online na kasi sya boss .
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

ts.. may tut kb kung pano gumawa ng forum??? kahit maliit na forum lang
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

check mo po maigi kung tama ung username and password na nilagay mo sa mysql_connect()

note: Case sensitive na po sya pag naka upload na sa WWW
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

mga boss , na connect ko na po ung database ko . pero pag naglolog-in ako , nag reredirect sya sa site nang freewebhosting na ginamit ko hindi ddun sa ginawa ko , panu po ba to ? :help:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

Hello mga Master

Katatapos ko lang po sa XHTLM and Javascript.
Ang gusto ko sana ehhh kung paano gagawa ng
DATABASE. Ano po ba uunahin ko pag-aralan,
PHP or MySQL?

Pahingi narin po ng e-book sana para mapag-aralan ko narin.
Thank You.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

Hello mga Master

Katatapos ko lang po sa XHTLM and Javascript.
Ang gusto ko sana ehhh kung paano gagawa ng
DATABASE. Ano po ba uunahin ko pag-aralan,
PHP or MySQL?

Pahingi narin po ng e-book sana para mapag-aralan ko narin.
Thank You.

PHP basics tapos Mysql Database Connections, -> php basic CRUD :)
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

..ask qlang qng wat code ang ilalagay ko welcome s header ng website like dto sa symb for ex. welcome "user's identity like fname and lname na pngsama" sana matulunan nu po ako newbie kc ako sa php..thanks in advance
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

<B> madami ako tanung sir.hehe
ganito ung lumalabas sa ginawa kung registration form
kapag magcoconnect na siya sa registernext.php kung code ito po oh
"Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in D:\xampp\htdocs\registernext.php on line 14

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in D:\xampp\htdocs\registernext.php on line 14

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\xampp\htdocs\registernext.php on line 15" yan ang error

ito yung code ng registernext.php
"<?php
//include('connection.php');

//test para makita kung ang username ay alphanumeric
$test=$_POST[uname];


if(!eregi(("[^A-Za-z0-9]") , $test)) {
echo "You are Successfully Registered.";


//test for duplicate names
$query="SELECT * FROM user WHERE username='$_POST[uname]'";
$result=mysql_query($query);
$num=mysql_num_rows($result);

if ($num==0) {

}else{
header("Location:duplicatename.html");
}

}else{
header("Location:invalidname.html");
}

?> "

ano po ba problem dun sir?

tsaka ito din yung code ng connection.php ko
"<?php

$host="localhost"; //hostname
$username="precious";//username
$password="cornal"; //database password
$db_name="login_form";//database name

//connect to database
mysql_connect("$host","$username","$password") or die ("cannot connect to server");
mysql_select_db("$db_name") or die ("cannot select DB");

?> "

tapos kapag nagreregister na ako di man napupunta ung information sa database ko na login_form tapos table na user :slap:</B>


i think wala kang insert into na query kaya di pumapasok sa database ung mga niregister mo
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

Help naman po mga sir experts... Nagdedevelop ako ngaun ng isang site kaso may problema ako contact form ko.. okay na yung mga fields... hinde ko lang alam kung papano ko papaganahin ung submit button, na kapag pinress e magsesend saking email ung mga info dun sa form......

madame na kong mga tutorials na ginawa pero hinde sila gumagana.. ang alam ko kasi duon e kailangan ng PHP code or javascript, which is hinde ko maggawa.....

naggawa ko na ung "mailto:" method pero kapag iyon ginamit lumalabas pa yung outlook bago kapa makapagsend...


Please po mga sir, patulong naman... aLL replies are HIGHLY APPRECIATED!!!
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

sir paano po b gumawa ng graph sa php... line graph, pie graph etc. gamit po un database mo??? Thanks

- - - Updated - - -

View attachment 150982View attachment 150983

bakit po ganoon... pag ini open ko yan s firefox bakit ganyan ngayayari.. pero g google chrome nmn ok nmn xa
 

Attachments

  • firefox.jpg
    firefox.jpg
    249.3 KB · Views: 6
  • google.jpg
    google.jpg
    290.6 KB · Views: 9
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

Help naman po mga sir experts... Nagdedevelop ako ngaun ng isang site kaso may problema ako contact form ko.. okay na yung mga fields... hinde ko lang alam kung papano ko papaganahin ung submit button, na kapag pinress e magsesend saking email ung mga info dun sa form......

madame na kong mga tutorials na ginawa pero hinde sila gumagana.. ang alam ko kasi duon e kailangan ng PHP code or javascript, which is hinde ko maggawa.....

naggawa ko na ung "mailto:" method pero kapag iyon ginamit lumalabas pa yung outlook bago kapa makapagsend...


Please po mga sir, patulong naman... aLL replies are HIGHLY APPRECIATED!!!


elaborate.

- - - Updated - - -

sir paano po b gumawa ng graph sa php... line graph, pie graph etc. gamit po un database mo??? Thanks

- - - Updated - - -

View attachment 866657View attachment 866659

bakit po ganoon... pag ini open ko yan s firefox bakit ganyan ngayayari.. pero g google chrome nmn ok nmn xa


an check mo na maayos ung css mo? pwede pa silip ng code para makita natin ung mali
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

thanks @ richwel....

- - - Updated - - -

eto un code


<?php
include_once("header.php");
include_once("config.php");
?>
<script>
count = 0;
function add(){
injured_con = document.getElementById("injured").value
document.getElementById("show_injured").innerHTML=document.getElementById("show_injured").innerHTML+
"<span id="+count+">"+injured_con+"<a onclick='removeMe("+count+")' href='#remove'> <img src='img/close.png'/></a><br></span>";
document.getElementById("injured").value="";
var injured = document.getElementById("show_injured").innerText;
document.getElementById("hidden_injured").value=injured;
count++;}
function removeMe(val){
document.getElementById(val).outerHTML="";
}
</script>
<script>
function CheckForm(){
var dt_haz = document.getElementById('dt_haz');
var loc = document.getElementById('loc');
var haz_name = document.getElementById('haz_name');
var haz_desc = document.getElementById('haz_desc');
var consequence = document.getElementById('consequence');
var cost = document.getElementById('cost');

if(Nempty(dt_haz,"Please Input Date Hazard Identified")){
if(Nempty(loc,"Please Input Location")){
if(Nempty(haz_name,"Please Hazard Name")){
if(Nempty(haz_desc,"Please Hazard Description")){
if(Nempty(consequence,"Please Input the consequence")){
if(Nempty(cost,"Please Input Cost")){
return true;
}
}
}
}
}
}
return false;}

function Nempty(elem, msg)
{
if(elem.value.length == 0)
{
alert(msg);
elem.focus();
return false;
}
return true;
}
</script>
<style>
.inci_css{
font-weight:bold;}
</style>
<!--- CONTENT AREA -->
<?php if(isset($_GET['status']) && $_GET['status'] == "success"){ ?>

<div style= margin-left: 560px;
margin-top: 20px;" class="ad-notif-success grid_12 small-mg"><p>The Hazard has been succesfully added!</p></div>

<?php
}?>
<div class="content container_12">
<div class="box grid_12">
<div class="box-head"><h2>RECORD A HAZARD</h2></div>
<div class="box-content no-pad">
<div id="filemgr"></div>
</div>
</div>
</div>
<br />
<br />
<center>
<form method="post" action="process.php" onSubmit="return CheckForm()">
<table width="1000" style="border-radius:5px; border:1px double gray;">
<tr>
<td class="inci_css">Date Hazard Identified</td>
<td><input id="dt_haz" class="datepicker" type="text" name="dt_haz" /></td>
<td class="inci_css">Location</td>
<td><input id="loc" type="text" name="loc" /></td>
</tr>
<tr>
<td class="inci_css">Unit Responsible</td>
<td><select id="resp" name="resp">
<?php
$sql="SELECT abbreviation FROM tbl_units WHERE status = 0";
$res=mysql_query($sql) or die("error:".mysql_error());
$i=0;
while($row=mysql_fetch_array($res)){
$abbreviation[$i]=$row['abbreviation'];
$i++;}
for($x=0;$x<=count($abbreviation)-1;$x++){
?>
<option value="<?php echo $abbreviation[$x]; ?>"><?php echo $abbreviation[$x]; } ?></option>
</select></td>
<td class="inci_css">Hazard Impact</td>
<td>
<select name="impact">
<option>People</option>
<option>Property</option>
<option>Process</option>
<option>Environment</option>
<option>Reputation</option>
</select>
</td>
</tr>
<tr>
<td class="inci_css">Hazard Name</td>
<td><input id="haz_name" type="text" name="haz_name" /></td>
<td class="inci_css">Hazard Description</td>
<td><textarea id="haz_desc" name="haz_desc"></textarea></td>
</tr>
<tr>
<td class="inci_css">Hazard Type</td>
<td>
<select name="haz_type">
<option>Physical</option>
<option>Biological</option>
<option>Chemical</option>
<option>Ergonomics</option>
</select>
</td>
<td class="inci_css">Inherent Hazard</td>
<td>
<input checked="checked" type="radio" name="inh_haz" value="no" /> No
<input type="radio" name="inh_haz" value="yes" /> Yes
</td>
</tr>
<tr>
<td class="inci_css">Consequences</td>
<td><textarea id="consequence" name="consequence"></textarea></td>
<td class="inci_css">Damage Cost</td>
<td><input id="cost" name="cost" type="text" /></td>
</tr>
<tr>
<td style="text-align:center;" colspan="4">
<input class="button yellow" name="risk" type="submit" value="RECORD" />
</td>
</tr>
</table>
</form>
</center>
</div>
<br />
<br />
<br />
<div class="footer">
<p>Copyright 2013, All right reserved</p>
</div>

<script> /* SCRIPTS */
$(function () {
var elf = $('#filemgr').elfinder({
resizable: false,
url : 'php/connector.php' // connector URL (REQUIRED)
}).elfinder('instance');
});
/*date picker*/
$("#datepicker").datepicker();
</script>

</body>

</html>

- - - Updated - - -

Mga Sir paano po b gumawa ng graph s php gamit un data base???
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pa

can you send me the file para makita ko ng actual? hehe di ko ma visualize. sorry
 
Back
Top Bottom