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

Un oh. Meron ako mapapagARALan about PHP. Tnx sa THREAD!:clap:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

pwede phingi ng css + html + jquery na template.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

•Use md5() in password
•Use addslashes(), trim(), htmlentities() for validation
•Use PDO extension for secured SQL transactions

d ko gets ang 2nd at 3rd pero try ko e-research at pag-aralan. pag may problema balik lang po ako d2. heheheh salamat nga po pala sa 2long
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

•Use md5() in password
•Use addslashes(), trim(), htmlentities() for validation
•Use PDO extension for secured SQL transactions

d ko gets ang 2nd at 3rd pero try ko e-research at pag-aralan. pag may problema balik lang po ako d2. heheheh salamat nga po pala sa 2long

1. Using md5() or other hash functions makes your password hard to crack. Kasi di cya the actual password, need pa yong attacker to decrypt. Compare to storing your password directly to your database madali cyang ma.hack. Like mas secure if you store your password as "1232ds493sfk3894fk549fk4" than the exact string "MyPassword".

2. Add some php functions.
-addslashes() will escape some strings such as ' or other string this will prevent from breaking your queries. For example you have your user name na my'Username observe you have a quote (') in it. Pag.e.ru.run mo yan sa script mo. Without escaping it your query will break. Invalid SQL command on line bla bla blah... Magiging ganito kasi yong SQL mo. SELECT * FROM table WHERE username = 'my'Username', kaya mali.
-trim() will clean some trailing spaces. If you don't clean it. You might end up confusion. Like you will be expecting "My String" dun sa database mo. Pero when you stored it you, instead you type "My String" naging "My String " tapos when you retrieve it di mo makuha yong expected output kasi mali yong pagka.store.
-htmlentities() this will convert special characters to htmlentities like & or ' into & or " respectively. This is helpful especially when you deal with different encoding dun sa database and your html.

3. Use PDO extension ng PHP, php_pgsql or php_mysql extensions these will link your PHP script to your database and add security features and functions para mas mapadali yong interaction between your databases. I think the author try to emphasize this function mysql_real_escape_string().

Hope that would clarify you. Many more functions in PHP and your Databases that will help you with your security features. Just go over with the documentation or read some codes related to this so that you will learn how other programmers attempt to minimize or solve this ones.

The thing is no matter how you apply it, if your algorithm has leaks meron paring problem. :)
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

1. Using md5() or other hash functions makes your password hard to crack. Kasi di cya the actual password, need pa yong attacker to decrypt. Compare to storing your password directly to your database madali cyang ma.hack. Like mas secure if you store your password as "1232ds493sfk3894fk549fk4" than the exact string "MyPassword".

2. Add some php functions.
-addslashes() will escape some strings such as ' or other string this will prevent from breaking your queries. For example you have your user name na my'Username observe you have a quote (') in it. Pag.e.ru.run mo yan sa script mo. Without escaping it your query will break. Invalid SQL command on line bla bla blah... Magiging ganito kasi yong SQL mo. SELECT * FROM table WHERE username = 'my'Username', kaya mali.
-trim() will clean some trailing spaces. If you don't clean it. You might end up confusion. Like you will be expecting "My String" dun sa database mo. Pero when you stored it you, instead you type "My String" naging "My String " tapos when you retrieve it di mo makuha yong expected output kasi mali yong pagka.store.
-htmlentities() this will convert special characters to htmlentities like & or ' into & or " respectively. This is helpful especially when you deal with different encoding dun sa database and your html.

3. Use PDO extension ng PHP, php_pgsql or php_mysql extensions these will link your PHP script to your database and add security features and functions para mas mapadali yong interaction between your databases. I think the author try to emphasize this function mysql_real_escape_string().

Hope that would clarify you. Many more functions in PHP and your Databases that will help you with your security features. Just go over with the documentation or read some codes related to this so that you will learn how other programmers attempt to minimize or solve this ones.

The thing is no matter how you apply it, if your algorithm has leaks meron paring problem. :)



Agree ako boss, case to case basis pa rin ang batayan sa effective programming,

Recommend ko na kailangan mo ng hacker mentality at ikaw mismo ang umatake sa program mo,
kapag hindi mo na kayang i hack, then you might consider it as a good program already.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Mga master, sino po ba may alam kung pano gawin tong site na to http://totalmarketingclub.com/membership/

yung di sya mag drag at pag na right click mo walang save image as (kahit parang my image yung site diba?)

ano sa tingin nnyo?
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

pano sir mag create mag generate ng pdf file ung na search na data... example po... nag search ako ng sample data sa db ko tapos gusto ko to isave sa pdf file para maprint.... help po
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Sir. How to reset sql configuration. ininstall ko kasi e, kaso nakalimutan ko po yung password na nilagay ko. after ko iuninstall syempre reinstall ko po. kaso hinihingi na ung current password w/c is yung nakalimutan ko na. panu po ireset un para pag ininstall ko xa ulit gagawa nq ulit ng new password?? tnx!
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

hey baka po meron kayo jan sample system using php+js tas ms access ung database, kahit ung simple functions lang po na add/edit/delete/update/search wala po kase ko makita eh salamat po sa makakatulong :salute:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Mga master, sino po ba may alam kung pano gawin tong site na to http://totalmarketingclub.com/membership/

yung di sya mag drag at pag na right click mo walang save image as (kahit parang my image yung site diba?)

ano sa tingin nnyo?



Use CSS background property and an empty div to where you wanted the background to appear.

A quick example would be:

<div style="height: 100px;width: 750px;margin: 0;padding: 0;background: url('//path/to/the/image/file.png')"></div>



although you can also download the background image by using "Inspect Element" of google chrome.
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

hey baka po meron kayo jan sample system using php+js tas ms access ung database, kahit ung simple functions lang po na add/edit/delete/update/search wala po kase ko makita eh salamat po sa makakatulong :salute:

Obsolete po ang MS Access as database platform sa PHP. Try to use MySQL for your database structure.

Also take note that: not all browser or media can run javascript. So you must create a program that is independent to javascript.

Use javascript for modular features like animation.


I'll make a simple program for you to start.

<?php

define( 'DB_HOST', 'localhost' );
define( 'DB_USER', 'root' );
define( 'DB_PASS', '' );
define( 'DB_NAME', 'data' );


$conn = mysql_connect( DB_HOST, DB_USER, DB_PASS );
mysql_select_db( DB_NAME, $conn ) or exit( "Error" );


@mysql_query( "CREATE TABLE `data` (
`name` VARCHAR(100),
`message` VARCHAR(500),
`date` BIGINT,
`id` BIGINT NOT NULLL AUTO_INCREMENT,
PRIMARY KEY(`id`)
)", $conn );

// started 12:57 PM 10/17/2011
if( isset( $_POST['action'] ) )
switch( $_POST['action'] )
{
case 'Insert':
$name = htmlentities( trim( $_POST['name'] ) );
$message = htmlentities( strip_tags( $_POST['message'] ) );
$date = strtotime( 'now' );


$sql = "INSERT INTO `data`( `name`, `message`, `date` ) ".
"VALUES ( '$name', '$message', $date )";

echo mysql_query( $sql, $conn ) ? "Data was saved!" : "Error saving to the database.";

break;

default:
echo "You are hacking my system!";
}

// 12:59 PM 10/17/2011

?>
<form method="post" action="?".
<!-- NOTE the javascript we used here! -->
<strong>Name:</strong> <input type="text" name="name"
onfocus=" this.value = this.value == 'Name' ? '' : this.value"
onblur=" this.value = this.value == '' ? 'Name' : ''" />
<br />
<strong>Message: </strong> <input type="text" name="message />
<br />
<input type="submit" name="action" value="Insert" />
</form>
<?php
// 1:02 PM 10/17/2011
$sql = "SELECT * FROM `data` ORDER BY `date` ASC LIMIT 20";

$result = mysql_query( $sql, $conn );

while( $data = @mysql_fetch_assoc( $result ) )
echo "<p>".
"<strong>$data[name]</strong>: <i>$data[message]</i>".
"</p>";
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

pano sir mag create mag generate ng pdf file ung na search na data... example po... nag search ako ng sample data sa db ko tapos gusto ko to isave sa pdf file para maprint.... help po


Use PDF class in php. Try to review their API from http://www.php.net/
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Sir. How to reset sql configuration. ininstall ko kasi e, kaso nakalimutan ko po yung password na nilagay ko. after ko iuninstall syempre reinstall ko po. kaso hinihingi na ung current password w/c is yung nakalimutan ko na. panu po ireset un para pag ininstall ko xa ulit gagawa nq ulit ng new password?? tnx!

1.) Uninstall MySQL.
2.) Delete MySQL installation folder.
3.) Remove registry of mySQL service
- start > run > 'regedit'
- delete HKEY_LOCAL_MACHINE > SOFTWARE > mysql
4.) Delete MySQL Data files from:
- C:\Documents and Settings\All User\Application Data\MySQL (on Windows XP)
5.) Re install the MySQL.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Use PDF class in php. Try to review their API from http://www.php.net/

You can use any of the following libraries or applications that will help you generate pdf. Marami pa sila.

http://www.tcpdf.org/
http://code.google.com/p/dompdf/

Most features ng mga softwares above were to render your html. Yong gagawin mo lang sa data mo is retrieve it from your database. Then after that you will format it into html tables. Then use the apps above to render it and download it to pdf.

YOu can read more on their documentations on how to... :)
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Use CSS background property and an empty div to where you wanted the background to appear.

A quick example would be:

<div style="height: 100px;width: 750px;margin: 0;padding: 0;background: url('//path/to/the/image/file.png')"></div>



although you can also download the background image by using "Inspect Element" of google chrome.

panu if <table> gagamitin? pwede hingi ng sample code?panu e insert yun sa table
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

newbie lang po ako sir sa pag pphp pde po give ka po sample ng magquery ng sa db tapos print sa pdf ung result... thx

Dito may examples with TCPDF

http://www.tcpdf.org/examples.php

Just click the PDF for the sample output. Then the PHP for the source. :)

For DOMPDF

http://pxd.me/dompdf/www/examples.php
http://code.google.com/p/dompdf/wiki/Usage

Jan browse mo yong site you can see more examples in their.

Yong target mo lang dito is to create an html. Tapos sila na mag.render to make it pdf. Just extract the data to your database. Then same as preparing your html to your browser.
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Pls. help po...ano po kaya problema ng script na to at may error...


/**
* selects and sets the current database
*
* @param string $database
*
* @return void
*
* @access public
*/
function SelectDB($database) {
mysql_select_db($database,$this->conn_id) or die("CDatabase::SelectDB() error");
$this->current_db = $database;
}

thanks in advance!
 

Attachments

  • error_DB.JPG
    error_DB.JPG
    27.2 KB · Views: 3
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Pls. help po...ano po kaya problema ng script na to at may error...


/**
* selects and sets the current database
*
* @param string $database
*
* @return void
*
* @access public
*/
function SelectDB($database) {
mysql_select_db($database,$this->conn_id) or die("CDatabase::SelectDB() error");
$this->current_db = $database;
}

thanks in advance!

Post mo daw yong script. I guess sa access scope to ng class mo.

try using only mysql_select_db($database, $this-> conn_id); to display the errors. Just revert it back after you have known the cause.

be sure also to set your error_reporting to all so that you can see errors while developing. Turn it off nalang on deployment at live.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Tangong lang po tunkol sa sql

Halimbawa pong may 2 field ung database ko tapos may lamang 5 records

? f1 f2
1. 123 a
2. 123 b
3. 321 c
4. 321 d
5. abc e

Ang gusto ko pong mag output ay

123, 321, abc

yang 3 lang
ang nagagawa ko lang po ay palabasin ung 5 records
123, 123, 321, 321, abc

help po thxx...
 
Last edited:
Back
Top Bottom