Thursday 7 November 2013

File Upload in PHP

Hi there
Uploading file on server is a process of getting data from user. you cannot ignore it and every web developer needs upload file.php has some built in function which helps to upload file take a look on following line..
Control
File up loader
Submit button
Code
<?php
       $msg="";
       if(isset($_POST['submit'])
      {
           if($_FILES['file']['name']!="")
          {
   $extnsn=end(explode(".", strtolower($_FILES['file']['name'])));
    if($extnsn=="rtf" || $extnsn=="doc" || $extnsn=="docx" || $extnsn=="txt" || $extnsn=="pdf")
    {                                                                
              if(($_FILES['file']['size']/1024)>1024)
             {
                      $msg="Sorry ! Maximum upload file  size is  1024 KB";
              }
              else
              {
                     move_uploaded_file($_FILES['file']['tmp_name'],"resume/".$r[0].".".$extnsn);
                      $msg="Thanks for uploading  file";
                      <?php
                             echo $msg;
                      ?>  

Saturday 12 October 2013

PHP form tutotial

An HTML form is a section of a document containing normal content, markup, special elements called controls (checkboxes, radio buttons, menus, etc.), and labels on those controls. Users generally "complete" a form by modifying its controls (entering text, selecting menu items, etc.), before submitting the form to an agent for processing (e.g., to a Web server, to a mail server, etc.)

Methods

The method attribute specifies how to send form-data (the form-data is sent to the page specified in the action attribute).
The form-data can be sent as URL variables (with method="get") or as HTTP post transaction (with method="post").
Notes on GET:
  • Appends form-data into the URL in name/value pairs
  • The length of a URL is limited (about 3000 characters)
  • Never use GET to send sensitive data! (will be visible in the URL)
  • Useful for form submissions where a user want to bookmark the result
  • GET is better for non-secure data, like query strings in Google
Notes on POST:
  • Appends form-data inside the body of the HTTP request (data is not shown is in URL)
  • Has no size limitations
  • Form submissions with POST cannot be bookmarked

How to Cancel PHP form submission using javascript


<?php 

$msg="";

if(isset($_POST['submit']))

{
$msg="ok";//put your code here
}
?>

Monday 30 September 2013

Save Image in Ms-Access 2003 and 2007 Using VB6.0

Hi There

 I was my dream to save image in access I tried many website and books but didn’t do that. Then I consider about memo field in access database. Memo data type is use to hold long amount of data in textual or binary format. Memo field become solution of my problem. I hope my work will help you just, do it in my way….

Design window

Friday 2 August 2013

Data Structure Using C++

#include<iostream.h>
#include<conio.h>
class node
{
int data;
node *next;
public:
node()
{
next=NULL;
}
friend class list;
};
class list
{
node *start;
public:
list()
{
start=NULL;
}

PHP Tutorial

Show Records Using Gridview

My table named users have three field (roll,name,city)

<style>

.font_color
{
color:#666655;
font-size:15px;
text-align:justify;
}

Monday 29 July 2013

How to Add SWF (Flash) File in Your Blogger

Hi folks

When I learned Flash i want to show it on my Blog but blogger  doesn't accept swf format. then
I find a solution form net.

  •   Upload your swf file online (On your domain) or any other free flash hosting site
  • Then copy the url
  • You need to go in html update mode 
  • Click on html as showed in picture place the following code and update

<object height="350px" width="400px">
<embed src="http://www.basantgroupofinstitution.org/swf/butterfly.swf" height="400px" width="400px">
</embed>
</object>

Sunday 14 July 2013

Flash Tutorial




Hi Friends I love animation and always want to make it flash make my dream true.
You can make animation using flash very easily just take a look on following Lines and images
What do you think movies are really includes moving object? No!
Movies are a collection of changing images, which plays more than one picture at a time. Being a Human we’re not able to see that differences.







Flash used this basic for make animation you have to work on frame which includes different  types of image and run it more than one image at a time.

Face Moving Expression

Friday 14 June 2013

Save Record on php server

Hi....

I spend lot of time to achieve this. I Searched many website but didn’t find a proper way which help me to do this. Then I use php manual which help me to find my solution.
Mostly we use  mysql_connect("localhost","root","") this will work on client side where you develop your application. You just have to change the format of  mysql_connect()  function and rest of the thing will be same as you used to on your client.
mysql_connect("localhost","Girfa","12345")
Girfa is your user name and 12345 is password of your website. Which you got when launch your website.

<html>
<head>

<title>Girfa Saving Record on PHP Server</title>
<?php
    if($_GET['name1'])
        demo();
    function demo()
    {
        $con=mysql_connect("localhost","girfa","12345") or die("Could not open the database ");
        mysql_select_db("basant_bsw",$con);
        $roll=$_GET['roll'];
        $nm=$_GET['name'];
        $ct=$_GET['city'];
        $quary="insert into stu values('$roll','$nm','$ct')" or die("error in making sql");
        mysql_query($quary,$con) or die("unable to run sql quary");     
       

    }
?>
</head>
<body>
<form name="form1" method="get" action="<?php $_PHP_SELF ?>">
     Roll :  <input type="text" name="roll" /><br />
    Name : <input type="text" name="name" /><br />
    City : <input type="text" name="city" /><br />
   <input type="submit" value="save" name="name1" />
</form>
</body>
</html>

Friday 3 May 2013

File Read/Write Using VB 6.0

 Dim filenm As Integer
    filenm = FreeFile
    Open "d:\demo.txt" For Input As filenm
    Dim str As String
    Do While Not EOF(filenm)
        Input #filenm, str
        Label1.Caption = Label1.Caption + vbCrLf + str
    Loop

   Open "d:\readme.txt" For Output As #1
    Print #1, Text1.Text
    Close 1

Appending text in a file without overwriting content


Open "d:\readme.txt" For Append As #1
    Print #1, Text1.Text
    Close 1 

Wednesday 10 April 2013

Connect VB 6.0 with Oracle and SQL Server

Hi...
Database is the heart of any business application. When we make any software then most of the  things floats near of database. As we know oracle is the most popular database in the world connecting oracle to your VB application is very simple simple. take a look on following and please don't tell me thanks..

  • Import a class reference for Project > References
  • Add Microsoft ActiveX Data Objecs 2.8 Library from references
  • Make an object of ADODB.Connection
  • Open DB Connection Consider the connection string
  • Rest of the things are same as you do with access database

Dim con As New ADODB.Connection
    con.Open "Provider=MSDAORA.1;User id=scott;password='tiger';Persist Security Info=False"
    con.BeginTrans
    con.Execute "insert into vb values(110,'niraj','lanka')"
    con.CommitTrans
    MsgBox "Saved"

SQL Server

Table Name Stu(Roll number,Name varchar2(20),City varchar2(20)), Import Microsoft Active Data Objects 2.0 from Project>References

Save Button Code


 con.Open "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bsw"
con.BeginTrans
    con.Execute "insert into stu values(" & Text1.Text & ",'" & Text2.Text & "','" & Text3.Text & "')"
    con.CommitTrans

Friday 5 April 2013

Photo Shop Tutorial


Hi there....
I love photoshop because its provide wing to my imagination. I am taking lots of advantage of powerful tools of photoshop.You can enhance quality of your designing using this tutorial . I do not have any specific degree about photoshop I just make this tutorial which help you to make some type innovative graphics.Now Get start.....
Text Effect
  
Photoshop provide separate tool for text which create a separate layer when you write text.

Text Effect with hole
Develop By Raj Kumar
  • Type your text
  • Add a layer up side of text layer
  • Click on text layer and newly added layer border with alt key. It’ll merge text and normal layer. Now you can use brush tool for color (Because brush tool can not be apply directly on text layer)
  • Apply shadow  and other effect using Layer style by double click on text layer
  • Apply mask on text layer
  • Choose brush make high percentage of hardness and opacity
  • Move brush on text 

Tuesday 12 March 2013

How to stop mouse right click on a webpage

There are many cases when we don't allow users to see our source code.Enabling source code by right click provide option to users to load images of our site and see logic we you used to make your website.You can disable right click using java script paste the following code on your head section and see the magic
Paste this code on header section

<SCRIPT LANGUAGE="JavaScript">  
<!-- Disable  
function disableselect(e){  
return false  
}  

function reEnable(){  
return true  
}  

//if IE4+  
document.onselectstart=new Function ("return false")  
document.oncontextmenu=new Function ("return false")  
//if NS6  
if (window.sidebar){  
document.onmousedown=disableselect  
document.onclick=reEnable  
}  
//-->  
</script>

Monday 4 March 2013

How to use Google Translater on your web page

Google Translator provide a efficient way to translate your page in many language which make your webpage able to read person who wish to see your web page on his own language. Google provides some steps and translator will appear on your page follow the steps



  • Go to This address
    https://translate.google.com/manager/website/suggestions
  • Log in with your Google id

Wednesday 20 February 2013

How to show youtube video on your web page and How to Delete Youtube History

  • Log in YouTube
  • Upload your video
  •  Click on your profile name which is left side 






  • Now select your video which you want to show
  • Click share then embed
  • Copy the selected html code provide by you tube
  • Paste this html code where you want to show  your video











How to Delete Youtube Watch History

Monday 18 February 2013

How to get query string using java script

In the World Wide Web, a query string is the part of a uniform resource locator (URL) that contains data to be passed to web applications.Using query string user can pass the some data with URL that helps to take some action.I am representing an example which help you to find data with URL


Passing query string<a href="demo.htm?item1">Item </a>

Wednesday 16 January 2013

Make Vertical Line Using HTML

As we know <hr> tag is use to make horizontal line.But many time there is a need of make a vertical line we can not be possible  using hr ....But I Make with a trick that is table you can change a cell of a table in vertical line how?? take a look on following code..

<table cellspacing="5" border="0" cellpadding="1">
<tr valign="top" align="left">
<td width="300"><p>Put your page content</p></td>
<td width="1" bgcolor="#00FFEE"><br /></td>
<td width="100" valign="top" align="left">
<p>Enter Your Text</p>
<p>Girfa<br>Girfa<br>Girfa</p>
</td>
</tr>
</table>