billing

<?php session_start(); error_reporting(0); include_once('dbconnect/dbconnection.php'); date_default_timezone_set('Asia/calcutta'); if($_SESSION=='') { header("Location:index.php"); exit; } if(isset($_GET)){ $id=$_GET; //echo $id;die; $sql = "SELECT * FROM `temp_billing` WHERE `id`='$id'"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $tempQty=$row; $tempmetre=$row; $productId=$row; $sql = "SELECT * FROM `products` WHERE `id`='$productId'"; $result=mysql_query($sql); $row1=mysql_fetch_array($result); $productQty=$row1; $totalQty=$tempQty+$productQty; $metreqty=$row1; $totalmetre=$tempQty+$metreqty; if($productQty>=0){ $query_run2=mysql_query("update products set qty='$totalQty' where id='$productId'") or die(mysql_error()); }else if($row1>=0){ $query_run2=mysql_query("update...

codeigniter edit delete view

<?php $this->load->view('admin/segments/header'); ?> <?php $this->load->view('admin/segments/headertop'); ?> <?php $this->load->view('admin/segments/headernav'); ?> <script> function go_href(m){ $.ajax({ type:"POST", url:"<?=base_url("admin/freelancer/change_user_type")?>", data:{type:m,id:<?=$query?>}, beforSend:function(x){ }, success: function(data){ //alert(data); $('#change_type').html(data); } }); } $(function(){ var m = $('#utype').val(); $.ajax({ type:"POST", url:"<?=base_url("admin/freelancer/change_user_type")?>", data:{type:m,id:<?=$query?>}, beforSend:function(x){ }, success: function(data){ //alert(data); $('#change_type').html(data); } }); }); </script> <div id="main" class="container_16" style="float:left; padding:5px; margin-top:20px;"> <div class="grid_16"> <div id="content"> <div...

Codeigniter registration

<!-- Start: MAIN CONTENT --> <?php $this->load->view('segments/top'); ?> <!-- Start: MAIN CONTENT --> <div class="content"> <!-- Start: slider --> <div class="container"> <div class="page-header"> <h1 style="color:#22a5f0">Sign Up</h1> </div> <div class="row"> <div class="span6 offset3"> <h4 class="widget-header">Before continuing...

How to create Registration Page in Php

<?php session_start(); require 'conf.php'; error_reporting(0); $db=new db(); $msg=''; if(isset($_POST)) { //print_r($_POST);exit; $cityzenship=$_POST; $age=$_POST; $sex=$_POST; $socialdis=$_POST; $subcat=$_POST; $subcategories=implode(',', $subcat); $sql="select *from registration where email='$email'"; $run=mysql_query($sql); $num=mysql_num_rows($run); if($num!=0) { $msg="Email Already Exist"; } else { $as1="INSERT INTO registration SET cityzenship='$cityzenship', age='$age', sex='$sex',socialdis='$socialdis', fundinglook='$fundinglook',moneytext='$moneytext',idealcantext='$idealcantext',fname='$fname',lname='$lname',streetadd='$streetadd',city='$city',state='$state',zip='$zip',fphone='$fphone',mphone='$mphone',lphone='$lphone',email='$email',checkbox='$checkbox',category='$cat',subcategory='$subcategories'"; $que1=mysql_query($as1) or die(mysql_error()); if($que1){ $id=mysql_insert_id(); $_SESSION=$id; } header('location:inner_page.php'); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML...

How to link back to previous page using $_SERVER[‘HTTP_REFERER’] ?

How to link back to previous page  using $_SERVER given below . print_r($_SERVER); exit(); You will get List of Keys and Values in Array. Here I'm...
LAMP

How To Install LAMP : Linux, Apache, MySQL, PHP on...

Content - 1. Install Apache 2. Install MySQL 3. Install PHP 4. Restart Server 5. Test Apache 6. Test PHP   1. Install Apache: Apache is a free open source and cross-platform web...
LAMP

strip_tags – How to remove a hyperlink (HTML Tag)...

PHP strip_tags() Function : strip_tags - How to remove a hyperlink (HTML Tag) from content in php strip_tags : Strip HTML and PHP tags from a string. Example: $text = '<p>Let me...
PHP array_combine  Function 

PHP array_combine() Function : Two PHP arrays One as key and another as value

PHP array_combine() Function array_combine : (PHP 5, PHP 7) Creates an array by using one array for keys and another for its values Parameters: array $keys Array of keys to be used. Illegal...