.Net Framework, Asp.net, Ado.net, .Net Remoting, .Net Webservice, SQL, XML, XSLT, WCF, WPF, WWF NHibernate, Ajax, Jquery, DHTML

Ado.netAsp.Net 2.0SQLC-SharpXMLFrameworkIISXMLWebServiceArchitecture
UMLProject ManagementSDLCMethodologiesDesign PatterenOOPWCF.Net RemotingWWF
MVPMVCSilver LightN-HibernateAjaxJ-QuerySEO-MarketingSite MapPhp

Getting Started with Php, Ajax, Jquery

Basic php

Lets set the php development environment LAMP, Install WampServer2.0i.exe
Once you install WampServer2, you are ready to run a php file on browser,
We have expert php mysql developer in mumbai india, We can provide Php JQuery, php with mysql, php with ajax, php webservice, SEO compitable php design and more. Please contact us to know more about our service.
Once you are ready with php-mysql envionment you might have few basic questions, Here i am trying to put all questions and answers together.

Php is simply fun ! easy ..but yes more you do ..more you become expert.

How to include file?
Include file in php
<?php include("header.php"); ?>
1:
2:<?php include("footer.php"); ?>
3:
How to deal with cookie & session in php ?
Cookie and Session in php
<?php
1:// Setting and Reading Cookie
2:$value = 'Here i am setting my cookie values';
3:
4:setcookie("TestCookie", $value, time()+3600);
5:
6:echo $_COOKIE["TestCookie"];
7:
8:?>
9:
10:Now we see how to use session in php.
11:
12:Wherever you want to use session, you need to place the following line before <html> tag start.
13:
14:<?php session_start(); ?>
15:
16:Now setting value in session
17:
18:<?php
19:$_SESSION['username']=$_POST['username'];
20:?>
21:
22:Reading value from session
23:<?php
24:echo "<b>".$_SESSION['username'] . "</b>";
25:?>
26:
How to use ajax in php ?
How to use jquery in php ?
How to open database connection and read data in php ?
Read data from mysql in php
<?php
1:$con = mysql_connect("localhost","peter","abc123");
2:if (!$con)
3: {
4: die('Could not connect: ' . mysql_error());
5: }
6:
7:mysql_select_db("my_db", $con);
8:
9:$result = mysql_query("SELECT * FROM Persons");
10:
11:echo "<table border='1'>
12:<tr>
13:<th>Firstname</th>
14:<th>Lastname</th>
15:</tr>";
16:
17:while($row = mysql_fetch_array($result))
18: {
19: echo "<tr>";
20: echo "<td>" . $row['FirstName'] . "</td>";
21: echo "<td>" . $row['LastName'] . "</td>";
22: echo "</tr>";
23: }
24:echo "</table>";
25:
26:mysql_close($con);
27:?>
28:
Leave your comment.
Name
Email
Comments
Tell Us1766+5 =

Reduce your Dialy IT Cost, Consult with us
Stay healthy in recession

Advertisement
Sponsored by

Privacy Policy ©2009 ETG Consultancy, All Rights Reserved Terms & Conditions
Asp.net, Ado.net, .Net Remoting, .Net Webservice, SQL, XML, XSLT, WCF, WPF, WWF NHibernate, Ajax, Jquery, DHTML