16
Mar
Category : learn php script | Tags :php, template for easy edit | No Comments
If our php script has much file/page display, we can separate for header and footer for easy edit.
If we want to change/add something at header/top, we don’t need change all our php file, we can just only change our file header.php.
at our php file,we need add some code for include header and footer file.
we need place this code at top:
<?php
require_once( "header.php" );
?>
and at bottom place code :
<?php
require_once( "footer.php" );
?>
Ok, our php script has done. Place that code at all our php file. Next time, we don’t need change every file for add link/something at header or footer.
have nice coding
13
Mar
Category : learn php script | Tags :add field at mysql table, php | 3 Comments
this is php for add field at mysql table.You also can add manually from phpmyadmin.
The script :
mysql_query( "ALTER TABLE kelas ADD namakolom VARCHAR( 100 ) NOT NULL") or die( mysql_error() );
Continue Reading
Incoming search terms for the article:
mysql add field,
mysql table add field
8
Mar
Category : learn php script | Tags :php | No Comments
mysql_query( "
CREATE TABLE 'admin' (
'AdminID' int(10) NOT NULL auto_increment,
'username' varchar(50) default '',
'PASSWORD' varchar(32) default '',
PRIMARY KEY ('AdminID')
) ENGINE=MyISAM
") or die( mysql_error() );
That’s for create Table admin