PHP Image Upload

Diposting oleh Algam on Minggu, 28 Juli 2013

ass ................... for my second article I will discuss how to upload photos / images jpg, Jpeg etc.. to upload an image in php ituh very easy it can be said that the basic easy but if you are creative, people can upload pictures so uncommon and is not easy anymore. Ga lot of strings attached again I will start to upload images as well ... we need a database okay to database problems we already ga I think you have whiz table first of all we prepared for upload should calm gamabarnya Copas ko hehehe .... : D

   CREATE TABLE `tb_upload` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `image` TEXT NOT NULL) ENGINE = MYISAM;

For the second one we make for upload form script gambarnya.dan lifeline shelf

<? php
if (isset ($ _POST ['upload'])) {
  $ tipe_file = $ _FILES ['image'] ['type'];
  $ formatgambar = array ("image / jpg", "image / jpeg", "image / gif", "image / png");
$ namaimage = $ _FILES ['image'] ['name'];/ / create ngambil image name
$ alamatimage = $ _FILES ['image'] ['tmp_name'];/ / create the image address
$ image = move_uploaded_file ($ alamatimage, 'upload / images /'. $ namaimage);/ / this script mindahinnya "upload / images /" ituh want to save the image in the folder where you free up
mysql_query ("INSERT INTO` tutorial `.` tb_upload `(
`id`,
`image`
)
VALUES (
'', '$ Namaimage'
) ");
echo "been able to upload";
}
?>
The source code is action="" method="POST" enctype="multipart/form-data" name="form1">
   <table width="200" border="1">
     <tr>
       <td width="58"> Picture </ td>
       <td width="126"> <label for="image"> </ label>
       <input type="file" name="image"> </ td>
     </ tr>
     <tr>
       <td> </ td>
       <td> <input type="submit" name="upload" value="upload"> </ td>
     </ tr>
   </ table>
</ form>

  selsai may be useful for you and for me aminn worship <
wasssalam

Source MYBLOG Inspirasi OF Dreams
More aboutPHP Image Upload

scripts and tips or simple CRUD PHP Trick

Diposting oleh Algam

Assalamualaikum ................................................. ......... :)Hi readers this first article I am ..... hahaha wow it feels incredible rich gituh ariel .. so bloggers ituh. in my first article I will ngebahas like where .. how create view update delete in the simple ............... not many strings attached for the first time we started to learn php ituh have already mastered HTML Tips transform and easy to learn HTML fast should be memorized Tag, how to link to another page and know how to use Dreamweaver guaranteed to be easy. if you want to learn to use Dreamweaver and create html table please visit the blog Book Information.HTML for us through the matter I consider the reader. :)ok ..... CEkidottttttttttttttCreate your php to CRUD database has touched .. I usually use MYSQL datbase ..Create your first database for easy copy paste ..CREATE TABLE `tb_belajar` (`Id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,`Name` VARCHAR (50) NOT NULL,`Religion` VARCHAR (50) NOT NULL) ENGINE = MYISAM;Both of you make connectionskoneksi.php<? Php$ Host = "loclahost";$ User = "root";$ Pass = "" ;/ / if there is a password please fill in MQYSL$ Dbname = "tutorial";

 
mysql_connect ($ host, $ user, $ pass);mysql_select_db ($ dbname);?>third for form input

 
form.php <? phpinclude "koneksi.php";$ Id = $ _REQUEST ['id'];$ Mode = $ _REQUEST ['mode'];if ($ mode == "edit") {
    
$ Qry = mysql_query ("select * from tb_belajar where id = $ id");
    
$ Show = mysql_fetch_array ($ qry);}?>The source code is id="form1" name="form1" method="POST" action="save.php">
  
<table width="200" border="1">
    
<tr>
      
<td width="51"> name </ td>
      
<td width="133"> <label for="textfield"> </ label>
      
<Input type = "text" name = "name" id = "textfield" value = "<? Php echo $ show [1]?>"> </ Td>
    
</ Tr>
    
<tr>
      
<td> religion </ td>
      
<td> <label for="select"> </ label>
        
<select name="agama" id="select">
          
<option value="islam"> islam </ option>
          
<option value="kristen"> kristen </ option>
          
<option value="budha"> budha </ option>
          
<option value="hindu"> hindu </ option>
      
</ Select> </ td>
    
</ Tr>
    
<tr>
      
<td> </ td>
      
<td> <input type="submit" name="save" id="save" value="Submit"> </ td>
    
</ Tr>
  
</ Table></ Form>save for the fourth syntaksave.ph<? Phpinclude "koneksi.php";$ Id = $ _REQUEST ['id'];$ Mode = $ _REQUEST ['mode'];if ($ mode == "edit") {mysql_query ("UPDATE` tb_belajar `SET` name `= '$ _POST [name]',`Religion` = '$ _POST [religion]' WHERE `id` = $ id ");Else {}
   
mysql_query ("INSERT INTO.` tb_belajar `(`Id`,`Name`,`Religion`)VALUES ('', '$ _POST [Name]', '$ _POST [religion]') ") ;/ / the contents of $ _POST [ituh text and list name in the form before}echo "<script> alert ('Data behasi in save') </ script>";echo "<script> documet.location.href = 'index.php' </ script>";?>Fifth create index for view and deleteindex.php<? Phpinclude "koneksi.php";$ Id = $ _REQUEST ['id'];$ Mode = $ _REQUEST ['mode'];if ($ mode == "delete") {
        
$ Sqlquery = "DELETE FROM` tb_belajar `WHERE` id `= '$ id'";
        
$ Querycek = mysql_query ($ sqlquery);echo "<script> alert ('Delete successfully'); </ script>";}?>The source code is name="form1" method="POST" action="">
  
<table width="200" border="1">
    
<tr>
    
<td colspan="4"> <a href="form.php"> <input type="button" name="button" id="button" value="add"> </ a> </ td>
    
</ Tr>
  
<tr>
    
<td> id </ td>
    
<td> name </ td>
    
<td> religion </ td>
    
<td> action </ td>
  
</ Tr>
  
<? Php
  
$ Sql ​​= mysql_query ("select * from tb_belajar");
  
while ($ data = mysql_fetch_array ($ sql)) {
  
?>
  
<tr>
    
<td> <? php echo $ data [0]?> </ td>
    
<td> <? php echo $ data [1]?> </ td>
    
<td> <? php echo $ data [2]?> </ td>
    
<td> <a href = "form.php & id = <? php echo $ data [0]?> & mode = edit"> <input type = "button" name = "button2" id = "button2" value = " edit "> </ a>
      
<A href = "? Mode = delete & id = <? Php echo $ data [0]?>"> <input Type="button" name="hapus" id="hapus" value="Submit"> </ a> </ td>
  
</ Tr>
  
<? Php
  
}?></ Table></ Form>

 
Hopefully Helpful for us 

allSource MYBLOG Inspirasi OF Dreams
More aboutscripts and tips or simple CRUD PHP Trick

introduce cakephp

Diposting oleh Algam

hemmmmm time I will mempostingcakephp despite my lack of reliable use cakephp but I will give a little information about the current cakephp because I'm making a project using cakephp.
Cakephp is a framwork which is quite complete but it is all nothing is perfect framwork like humans framwork is used in accordance with the person who made ​​it.
So now we must recognize itself framwork
cakephp CRUD has a way of making it rather simple as long as you've made ​​a model is correct then you will be told to create a new view controller after the controller that outlines how to manufacture in cakephp CRUD. I now just tell Cakephp was good so I will not make the first tutor for the moment because I have not finished project.


This picture home and view Curd project that I created in cakephp
home
view CRUD
 Source Book Information
More aboutintroduce cakephp

create static html web use table

Diposting oleh Algam


Asalammualakum ...... how you've memorized the HTML tags that my last post ... I'm sure you must have memorized and able to use them for this post I want to give a little knowledge about how to use and how to LINK TABLE but before we start you must provide ADOBE application DREAWEAVER CS5 or more. But we can also use the NOTEPAD but easier to use DW CS5
No need to further ado we begin aja .....
Table can be used for web display to attract web on how to use a table saw
In starting with <table> and ends with </ table>
Now we open DW CS5
 The first step after you see a screen like the one above we choose
BALANK PAGE -> HTML -> CREAT After that click and click DESIGN
    INSERT -> FORM-> form  as below
 
Now we make a TABLE
click
  INSERT-> TABLE-> SETTING ROWS AND COLUMNS
I am using 3 rows and columns with headers none
After that we combined rows and columns of most of us use for the banner
The trick
BLOCK table that you want to unite -> RIGHT CLICK-> TABLE-MERGE CELLS
we love the picture and plug in the banner
INSERT-> IMAGE-> IMAGE SEARCH NO WHERE
after we love pictures like those above us love to look like a web menu
Any menu according to your theme
After that we combined the rows and columns at the bottom we use for the banner
The trick
BLOCK table that you want to unite -> RIGHT CLICK-> TABLE-MERGE CELLS
If it's your web Trim your html so interesting to other people can see we also use
Tags that yesterday I posted that like pulling your web bgcolour, background, h1, etc.

save as the name index.html
Examples such as this that I made with this tutorial


May be useful ..... wasalam.wr.wb

Source Book Information






More aboutcreate static html web use table

INTRODUCTION HTML

Diposting oleh Algam


Asalammualaiqum .... all of my long time now I am not posting anymore posts with new information for allwho want to learn basic HTML I will give you the knowledge I know it ....
HTML
discussed immediately wrote it very easy if you study diligently
You
must login first HTML tags
THIS
LIST Daan HTML TAG function
Key tag
Tag
Attribute Description
<html>
</html> The top line of each HTML file
<head>
</head> = General information from a web page
<title>
</title>   =  Title page. Contained in the head
<body>
</body>=
background
bgsound
font
link
alink
vlink
topmargin
leftmargin
marginheight
marginwidth
Setting attributes for the entire document

.
Modifikasi Teks
Tag Description Example
<b> </b>= Bold text Bold text
<i> </i> = Italic text Italic text
<u> </u> text underline text underline
<pre> </pre>= Preformatted text Sample text
<h1> </h1>= Header 1 Header 1
<h2> </h2> =Header 2 Header 2
<h3> </h3> =Header 3 Header 3
<h4> </h4> =Header 4 Header 4
<h5> </h5> =Header 5 Header 5
<h6> </h6> =Header 6 Header 6
<sub> </sub>= Subscript Subscript
<sup> </sup> =Superscript Superscript
Tag Atribut Deskripsi
<font>
</font>

color
size Name
Name Change the size of a font style.

Links
Tag Atribut Deskripsi
<a> </a>
target
Creates a link to the target document or other sites.
style
class
name
id
Gambar
Tag Atribut Deskripsi
<img>
src
Displaying an image bar
alt
name
border
height
width
<ol> </ol> Ordered List (digunakan
dengan <li>)
1. Item 1 <ul> </ul> nordered List (digunakan  dengan <li>)Item 1
<p> </p> Paragraf

Yes at the same memorized function and many other tags that I recommend looking at the MR co wrote a lot of GOOGLE. I also learned from it and for you to try examples of how to use the tag <p> </ p> and use the align <br/>:
<p align="left"> text is on the left </ p> <p align="right"> <br/> text in the middle </ p>
Bye-bye've had yes may be useful
To be continued ....


Source Book Information


More aboutINTRODUCTION HTML