Blue Theme Orange Theme Green Theme Red Theme
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Home | Forums | Videos | Advertise | Certifications | Downloads | Blogs | Interviews | Jobs | Beginners | Training
 | Consulting  
Submit an Article Submit a Blog 
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
Team Foundation Server Hosting
Search :       Advanced Search »
Home » Tutorials C# » Developing a PHP Website using Visual Studio 2005

Developing a PHP Website using Visual Studio 2005

Yes it’s possible to use PHP under Visual Studio 2005 and even Visual Studio 2008 IDE. In this tutorial, I will show a walkthrogh how it is possible to develop a classic PHP web application.

Author Rank :
Page Views : 21674
Downloads : 0
Rating :
 Rate it
Level : Beginner
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
 
Discover the top 5 tips for understanding .NET Interop
Become a Sponsor
 Tag Cloud
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 

Yes it's possible to use PHP under Visual Studio 2005 and even 2008 IDE; in this tutorial I will discuss how to build a PHP based Website using Visual Studio 2005 in a step by step walk through tutorial. 

Walkthrough:

First, you must install the visual PHP for visual studio witch is a share ware component that compose visual studio 2005, it is downloadable from the site http://www.jcxsoftware.com/vs.php web site, also, there is a version proposed for visual studio 2008. As a second step, you have to install it. The wizard will guide you until achieve the installation.

Figure 1

Figure 2

Figure 3

Choose install rather than customized to full install the component

Figure 4

Figure 5

After achieving the installation, select new then project.

Figure 6

As you may remark, there is a new node named PHP Projects is added. Click it.

Figure 7

Don't forget to name your project, so give your project a name in the text box then click OK. After that, a window appears and you are invited to select a folder within it the project will be created.

Figure 8

I've already created a folder for this reason, I call it myPhpApplication.

Figure 9

You can start now and enjoy your time by developing a PHP application under visual studio. To add a new item you have only to right click on the project node in the solution explorer and add a HTML, a PHP page or even a PHP class. To add more additional items, select the new item menu.

Figure 10

The following window appears.

Figure 11

Then you can select your item from within the list view.

Ok, let's start by developing a very simple and classic PHP application, a client side witch is an HTML page that sends via post method the first name and the last name of a given session user to a PHP application, the last one publishes those two received data.

This is the client script side bellow. So create a new HTML page and copy and past it into the code zone:

<HTML>
          <HEAD>
                   <META NAME="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
                   <TITLE>My first php application under visual studio</TITLE>
          </HEAD>
          <BODY style="background-color:Gray;">
          <center>
          <strong><h1 style="color:White;">Information request</h1></strong>
          <form style="background-color:Silver; color:Gray; width: 300px;"  method="post">
          <br />
          First name <input type="text" name="FirstName" /><br />
          Last name <input type="text" name="LastName" />
          <br />
          <br />
          <input type="reset" value="Reset" /><input type="submit" value="Submit the request" />
          <br />
          </form>
          </center>
          </BODY>

</
HTML>

The page will look like this bellow one:



Figure 12

Now let's perform the server side. First, add a PHP page into the project then paste this script server in the server code zone.

<?php

echo("The first name is ". $_POST['FirstName']." and the last name is ". $_POST['LastName']);

?>

Now, run the application and observe.

Figure 13

Click Submit the request.



Figure 14

You can also add a reference to your project; this step is performed to add built in PHP modules.

Figure 15

Good dotneting!!!
 

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
Login to add your contents and source code to this article
 [Top] Rate this article
 
 About the author
 
Bechir Bejaoui

The author holds a master degree in NTIC specialized  in software developement delivered by the high school of communication SUPCOM, he also holds a bachelor degree in finance delivered by  the  economic sciences and  management  university of Tunis "FSEGT".

He also holds:

MCPD enteprise solutions developement 3.5 certification and MCTS distibuted application developement 2.0

 He's a freelance developer since 2006. Actually woking on the WPF, .Net framewok 3.5, silverlight and the other .Net new features, in addition, he is painter and sculptor.

Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Discover the Top 5 .NET Memory Management Fundamentals
To write the best .NET code, you need to know exactly how the .NET framework really manages memory. Ricky Leeks presents the Top 5 fundamental facts of .NET memory management. Learn more.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
 
 Post a Feedback, Comment, or Question about this article
Subject:
Comment:
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
 Comments
using php with visual .net by malay On September 4, 2008
This is very helpful for me . thanks.
Reply | Email | Modify 
Re: using php with visual .net by Bechir On September 6, 2008
Not at all!! you're welcome
Reply | Email | Modify 
Nevron Chart
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.