Login   Register  
PHP Classes
elePHPant
Icontem

File: update.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Farhad  >  Farhad SQL  >  update.php  >  Download  
File: update.php
Role: Example script
Content type: text/plain
Description: update page
Class: Farhad SQL
Execute MySQL queries using parameter values
Author: By
Last change:
Date: 1 year ago
Size: 442 bytes
 

Contents

Class file image Download
/*for example we have 4 record in database we want to update them we put them in array then run the 
class
*/
<?php
        $record
[1]='name';
        
$record[2]='tell';
        
$record[3]='group_id';
        
$data[1]=$_POST['name'];
        
$data[2]=$_POST['tell'];
        
$data[3]=$_POST['group_id'];
        
$id=$_POST['id'];//record id in data base
        
$table=$_POST['table'];//our table name in database
        
$sql=new sql;
        
$sql->edit($table,'3',$record,$data,$id);
?>