Archive for the 'php' Category

Query update database

uery update is used for edit value in database
This is value at database reseller that we have insert first.

field username with value johnson
field passwd with value johnson$32#
field name with value Johnson Gunawan
field email with value Johnson@yahoo.com

After insert data to database, if want to edit/change value we can use :
mysql_query( ”
update database_name
set […]

Query insert database

After we create database reseller, we can insert data to database.
For insert data at php we must query insert
mysql_query( ”
insert into database_name
set query that will execute
“) or error( mysql_error() );
dont forget “” inside ( )
Example at php
mysql_query( ”
insert into reseller set
username = ‘$_POST[username]’,
passwd = ‘$_POST[passwd]’,
name = ‘$_POST[name]’,
email = ‘$_POST[email]’”) or error( mysql_error() );
$_POST[username] is form […]

Query create database

Starting with 70-270 and then going on to 646-204 followed by 70-620 is advisable for those who have done their 220-601 or 70-649 and are therefore exempted from SY0-101.
This is most use for create database from php
mysql_query( “CREATE TABLE database_name
( code to be executed )
TYPE=MyISAM;
“) or error( mysql_error() );
example in php
mysql_query( “CREATE TABLE reseller […]

Adding parameters in PHP Function

Adding parameters in PHP Function
Our first function writedate() is a very simple function. It only writes a static string.
To add more functionality to a function, we can add parameters. A parameter is just like a variable.
You may have noticed the parentheses after the function name, like: writedate(). The parameters are specified inside the […]

PHP Functions

Create a PHP Function
function is a block of code that can be executed whenever we need it.
Creating PHP functions:

All functions start with the word “function()”
Name the function - It should be possible to understand what the function does by its name. The name can start with a letter or underscore (not a number)
Add […]